HELP FROZVAL Steven Hardy, January 78
frozval(<frozen_value_number>,<closure>) -> <argument>;
This procedure (and its updater) access the arguments frozen into procedure
closures. FROZVAL takes two arguments:
1) a number specifying which frozen argument (numbering from the left) is to
be accessed and
2) the procedure closure.
Try the following:
define add3(x,y,z); x + y + z enddefine;
vars add; add3(%5,6%) -> add;
add3(4,5,6) =>
add(4) =>
frozval(1,add), frozval(2,add) =>
10 -> frozval(1,add);
add(4) =>
[purple] <> frozval(1,iscolour) -> frozval(1,iscolour);
See also
HELP *CLOSURES - on constructing closures
HELP *UPDATEROF - to define the updater of a procedure
HELP *PDPART - returns the procedure on which a closure is based
HELP *PARTAPPLY - produces a closure of an existing procedure
HELP *DATALIST - returns the components of a specified object
REF *PROCEDURE - for more details on procedures and closuresAuthor: Steven Hardy, January 78