up
previous
next
Function
Syntax
Function(S:STRING):FUNCTION
Function(P:STRING,S:STRING):FUNCTION
Summary
return a function
Description
This function returns the function---user-defined or built
in---identified by the string S. In the second form, one first
provides the name of the package, then the name of the function. (An
alternative is the syntax Function(P.S)
.
One may use Function
to assign a function to a variable which can
then be executed via the function Call
:
example
F := Function("Deg");
F;
Deg(...)
-------------------------------
Type(F);
FUNCTION
-------------------------------
Call(F,x+y^2);
2
-------------------------------
-- the Call-statement here is equivalent to:
Deg(x+y^2);
2
-------------------------------
Function("Insert");
Insert(L,I,O)
-------------------------------
Function("$cocoa/list","Insert"); -- or "Function("$cocoa/list.Insert")"
Insert(L,I,O)
-------------------------------
See Also