Macro - Monarch 9460 Programmer's Manual

Adk printer
Hide thumbs Also See for 9460:
Table of Contents

Advertisement

M A C R O
Purpose
Defines or invokes a single command the software expands to multiple commands
during script translation.
Syntax
To define the macro ...

MACRO

BEGIN
macro-body
END
To invoke the macro ...
macro-name
Process
The MACRO command defines or invokes a macro. A macro is a single command
the software expands to multiple commands during script translation. Each time a
macro command appears, the software inserts the commands it generates into the
script.
NOTE:
Do Not use IF, SWITCH, or WHILE inside a macro.
Defining the Macro ...
The
commands defining what the macro does. The keywords BEGIN and END define
macro-body
boundary.
Keep macros in a separate macro file you include in the source script using the
INCLUDE command.
Rule:
You must define macros before invoking them.
Invoking the Macro ...
The macro matches arguments. The first argument replaces %1, the second
argument replaces %2, and so on, up to %99 arguments.
Labels are handled differently in macros. The label names inside the macro body
should use this form:
*macro-label-name$
where
eight characters. This restriction helps avoid duplicate labels if a macro appears
within a function more than once.
As the compiler expands each macro ...
♦ it expands the labels.
♦ it expands each dollar sign ($) into a unique three-digit number.
5-58 Command Reference
macro-name
arg1 , arg2 , ... , arg99
macro-name
is an identifier naming the macro. The
's boundary and limit the scope of control transfer to within the
macro-label-name
is a unique name for the macro. The label can be up to
macro-body
contains the

Advertisement

Table of Contents
loading

Table of Contents