[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
CALLD
. Summary
calld(str <scriptname>, <arg1>, <arg2>, <arg3>, ...);
. Description
The calld function is used when one script file must call (jump into
and then return from) another. <scriptname> is the name of the
script file to call. If no extension is given, .SLC is assumed.
<arg1> through <argn> are the arguments or parameters to be passed
to the 'main' function of the called script. The value returned is
the value returned by the 'main' function of the called script, and
can be an integer or a string value, although the called script can
not return string variables local to itself.
Even if an image of the indicated script file is already in
memory, a new copy is still loaded from disk. This ensures that
global variables within the script will be set as defined in the
source file, and that there will be enough stack space, but requires
more memory and is slower.
The call function is exactly the same as the calld function, except
that if the script file to be called is already in memory because it
was previously loaded and made resident, or it is still executing
from a previous call, it is not released but instead the memory image
is used. This means that global variables will have whatever values a
previous run through left in them.
. Return Value
An integer or string value representing the value returned by the
main function of the called script file. This value must not be a
string variable defined within the called script, for memory rea-
sons. if the indicated script can not be found or loaded, a value of
-1 is returned. If the called script is aborted by the user, a value
of -1 is returned.
. Example
stat = call("TEST");
if (stat == -1)
prints("Called script could not be loaded or was aborted!");
See Also:
load_scr
is_loaded
call
unload_scr
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson