Examples of Macros
3-3
Figure 3. 1. PRESCRIBE Macro Limitations
Macro limitations are summarized as follows.
Examples of Macros
Example 1
The following macro example draws a circle. It first names the macro that issues the
PRESCRIBE commands for drawing a circle in the middle of a page.
!R! MCRO CIR1;
MZP 4, 5.5; CIR 1;
ENDM;
EXIT;
When completed, this macro will draw a circle after it has been sent to the printing sys-
tem.
!R! CALL CIR1; EXIT;
If you want circles of different sizes, you can make the radius into a so-called dummy
parameter. Dummy parameters in macro definitions are denoted using percent symbols
(%) as below:
!R! MCRO CIRCLE;
MZP 4, 5,5; CIR %1;
ENDM;
EXIT;
After this definition: CALL CIRCLE, 1; draws a one-inch circle, CALL CIRCLE,
2; draws a two-inch circle, and so on. Note the commas are required to separate the
macro name from the radius parameter in these CALL statements.
Maximum number of macros downloadable
to the printing system
Depends on the available printing sys-
tem’s memory
Maximum nesting levels 20
Maximum length of macro name 4 characters
Maximum number of parameters 19
Maximum length of CALL command 255 bytes
PRESCRIBE commands that should not be
contained within a macro definition
EXIT, LDFC, MCRO, DELM, DAM,
RDMP, ENDD, ICCD, WRED, EPRM