The Availability of Macros
You can declare two different kinds of macros during an application session:
- global macros
- local macros
Global Macros
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.
Local Macros
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,
#
is interpreted as
list all Documents
#
If you redefine
list #
is interpreted as
list ENTs format ENTName