You can declare two different kinds of macros during an application session:
The name declaration for a global macro uses the following syntax:
<name>
where
| name | a valid identifying name for the macro |
| < and > | macro name delimiters make the macro easy to distinguish |
After a global macro is declared, you can reuse it in any application program for the duration of the application session. When the session ends, the macro is no longer available.
The name declaration for a global macro uses the following syntax:
<n>
where:
| n | a number from 0 to 9 |
| < and > | macro name delimiters make the macro easy to distinguish |
Every procedure has its own set of ten local macros, <0> through <9>. You can use a local macro only while the procedure to which it belongs continues to execute. Once execution control transfers elsewhere, the local macros particular to that procedure are discarded.
Examples
Consider a global macro, <Fred>. If you define <Fred> to represent the character string list all, then the statement
#<Fred> Documents
is interpreted as
list all Documents
#<Fred> is the macro call that is replaced by the character string the <Fred> represents, list all. The number sign (#) is the macro call indicator.
If you redefine <Fred> to represent the character string ENT, then the statement
list #<Fred>s format #<Fred>Name
is interpreted as
list ENTs format ENTName