DO


do            {<file>{(<parameters>)}{,<n>}{,<text>}
{,<nvar>}}{,e}{,r}{,q}

Function

Execute a command file or macro.

Parameters

file

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

 

 

text

Implies begin execution at LABEL labelname within the file. The labelname should be a string of no longer than 16 characters starting with a letter.

 

 

nvar

Implies begin execution at LABEL nvar within the file. nvar should be a numeric variable.

 

 

parameters

A list of parameters passed to the macro by value or by reference. Type checking is carried out by the ARGUMENTS command which must also 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.

 

 

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

do draft/start

do heatex,5

do heatex, checklist

do heatex, tyy_again

do prog(v1,p2,s1)

do 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.

 

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, break, call, echo, exit, label, set(replace,std), step