up
previous
next
5.2.4 Other Help
1. A user may provide help and sometimes (rarely) get help for a
user-defined function using the
Help
feature of the
Define
command.
example
Help();
Type Help < Op > to get help on operator < Op >
-------------------------------
Help("GBasis"); -- note the typical response, one of the main
-- motivations for the author of the online manual.
No help available for GBasis
-------------------------------
2. The command,
Describe
, can be used to find more information about
functions.
example
Describe Function("Insert");
DEFINE Insert(L,I,O)
$list.Insert(L,I,O)
END
-------------------------------
Describe Function("$list.Insert
");
DEFINE Insert(L,I,O)
IF NOT(Type(L) = LIST) THEN
Return(Error(ERR.BAD_PARAMS, ": expected LIST"))
ELSIF I = Len(L) + 1 THEN
Append(L,O)
ELSIF I > Len(L) THEN
Return(Error(ERR.INDEX_TOO_BIG,I))
ELSIF I <= 0 THEN
Return(Error(ERR.INDEX_NEG,I))
ELSE
L := Concat([L[J]|J IN 1..(I - 1)],[O],[L[J]|J IN I..Len(L)]);
END;
END
-------------------------------
3. The function,
Functions
, may be used to list all functions
defined in a package.
Note:
Functions("$user")
lists all current user-defined functions.
example
Functions("$mat");
[About(), Man(), Identity(N), Transposed(M), Submat(M,Rows,Cols),
Jacobian(S), Resultant(F,G,X), DirectSum(M1,M2), BlockMatrix(LL),
ColumnVectors(M), Complement(M,I,J), Bip(M,J), Pfaffian(M),
Sylvester(F,G,X), ExtendRows(M,N), PushRows(M,N), ConcatRows(L),
PkgName()]
-------------------------------
The list of packages is given by
Packages()
.
4. The function
Starting(S)
where S is a string returns a list of all
functions starting with the string S.
example
Starting("Su");
["SubstPoly", "SubSet", "Submat", "Sum", "Subst", "Support"]
-------------------------------