Call

(Engine-Level Function)

Description: Starts an instance of the module specified by its first parameter.
Returns: The Return value of the instance of the module started.
Usage: Script or steady state.
Function Groups: Compilation and On-Line Modifications,  Basic Module
Related to: FindVariable | Self
Format: Call(Module [,Parm1, Parm2, Parm3, …])
Parameters:  
Module
Required. Any expression for the module that is to be started.
Parm1, Parm2, Parm3, …
Optional. Expressions to be passed to the module that is being started.
Comments: The additional parameters that are specified are passed to the started module as parameters to the call.

Example:

  ZEditField(10, 40, 110, 10, Mod, 32, 0, 1);
  If Valid(Mod) && ! Valid(X);
  [
    X = FindVariable(Mod, Self(), 0, 1);
  ]
...
  Call(X);

This section of code enables the user to enter a module name into the edit field, which will then be located by the script and started by the Call statement. Notice that in this particular example, no parameters are passed to the module, however, more edit fields could be created to accept variables or values to use as parameters to the module by entering them in the Call statement.