up previous next
Functions

list the functions of a package
Syntax

Functions(S:STRING):LIST of FUNCTION


Description
This function returns a list of functions defined in the package identified by S. (The function Packages lists the packages currently loaded into memory.)

Example
  Functions("$binrepr");
[About(), Man(), Initialize(), PolyBinRepr_xi(P), PolyBinRepr_xii(P),
BinExp(...), EvalBinExp(BE,Up,Down), Aux_BinExp(H,N), Tagged(X,T),
Print_Bin(B), Print_BinExp(BE), Print_BinRepr(BR), PkgName()]
-------------------------------
  L := It;
  Describe L[6];
Define BinExp(...)
  If Shape(ARGV) = [
    INT,
    INT] Then
    Return($binrepr.Aux_BinExp(ARGV[1],ARGV[2]))
  ElsIf Shape(ARGV) = [
    INT,
    INT,
    INT,
    INT] Then
    Return(EvalBinExp($binrepr.Aux_BinExp(ARGV[1],ARGV[2]),ARGV[3],ARGV[4]))
  Else
    Error(ERR.BAD_PARAMS,"(BinExp arguments must be 2 or 4 INT)")
  EndIf;
EndDefine;
-------------------------------