41
Pass a complete array to a subprogram by specifying the array name followed by
{ALL}. In this case, all values are passed to the subprogram and any changes made
are returned to the calling program. See the ProvideX User's Guide for more details
on this directive.
String templates cannot be passed if they are defined prior to the ENTER statement in
the called program.
CALL Using Entry-Point Labels
This directive also has an optional ProvideX feature you'll find useful for
applications like subprogram "libraries" (with multiple stand-alone routines, each
accessed by a line label). To use this form of access, append a semicolon plus the
label name of the starting statement to the subprogram name (e.g., CALL
"PROG;STARTING_LABEL",ERR=1000,X$,A,CT$). After the called subprogram is
loaded, ProvideX internally issues a GOTO STARTING_LABEL (e.g.) directive and starts
execution there. Use this to create a single subprogram with multiple entry points
and ENTER directives.
CALL and ENTER from ASCII Programs
When you run programs from ASCII text files, the CALL and ENTER with no
arguments will always fail because the system thinks that the variables have already
been assigned. To work around this, use the PERFORM directive or save the called
program in a program file.
See Also
Called Procedures, User's Guide
Examples
0020 CALL "ABCDEF",ERR=0050,A,4*F,Z$,X$(4,5),(Q)
In ABCDEF:
0030 ENTER Z,X,A$,B$,V$
Z will receive the value of A A will reflect changes in Z.
X will receive the value of 4*F.
A$ will receive the value of Z$ Z$ will reflect changes in A$.
B$ will receive the string from X$(4,5) which will not change.
V$ will receive Q$ but Q$ cannot be changed.