Macros

A macro is a process that executes one or more TCL commands. Macros are stored in the master dictionary with the name of the macro as the item-ID. The macro processor is provided for simple TCL procedures. In general, complex procedures should be written as BASIC programs.

When a macro name is entered at TCL, it may be followed by any number of parameters. These parameters are added to the end of the first TCL command in attribute 2 as additional language elements and then passed for processing.

The first line of a macro must contain the character m (modify mode) or n (nonstop mode). Each subsequent line is considered a TCL command. If the m code is used in the first attribute of the macro, the TCL command displays so that changes can be made to it before it is executed. If n is used, the macro runs immediately.

A macro may be created with the create-macro command. The create-macro command takes the last statement entered at TCL and converts it to a macro. When the cursor returns to TCL, type:

create-macro macro.name
Note: The create-macro sets attribute 1 of the macro to m. Use the Update processor to replace the m with an n if immediate execution is desired. To edit or create a macro using the Update processor, type:
u md macro.name