CALL


call          { <file> {(<parameters>)}{,<i>} } {,e} {,r} {,q}

Function

Execute a command file or macro with suppressed input.

Parameters

file

The name of the file to be executed. Default file extension s CMD.

 

 

parameters

list of parameters passed to the macro by value or by reference. Type checking is done by the ARGUMENTS command that must be present in the macro.

 

When a parameter is passed by reference a character @ must precede the parameter itself. The default mode is by value.

 

 

i

Implies begin execution at LABEL i within the file. i should have a value 0 through 50. The default value is 0, i.e. the beginning of the file.

 

 

e

Force exit from any interrupted command file still open before executing the new one.

 

 

r

Force-load the command file, by-passing the caching mechanism.

 

 

q

Execute the macro in quiet mode, suppressing the echoing or stepping of commands.

Examples

call shipdef

call @kitch/radlay,5

call prog(v1,p2,s1)

call prog(v1,p2,@s1)

Notes

If invoked in interactive mode with no command line parameters, control will return to a command file currently open but suspended via the "!" interrupt.

 

If the command file cannot be found in the current directory/library a search will be made in the STD system directory for a file of the same name.

 

When a command file is executed via CALL, commands ASK, IFYES and IFNO are skipped.

If a parameter is passed by reference then the content of the parameter can be changed by the macro, otherwise the parameter passed and the parameter in the macro will have two different scoping environments.

See also

FILE, arguments, ask, break, do, echo, exit, label, set(replace,std), step