Page 110 - DCAP507_SYSTEM_SOFTWARE
P. 110
System Software
Notes Macro-time variable (SET symbol) can be used to
accumulate working values during the macro expansion
amass the evaluation result of Boolean expression
manage the macro-time conditional structures
starts with "&" and that is not a macro instruction parameter
be initialized to a value of 0
be set by a macro processor directive, SET
Macro-time conditional structure
IF-ELSE-ENDIF
WHILE-ENDW
7.2.4 Keyword Macro Parameters
Positional parameters
Parameters and arguments are connected as per their positions in the macro prototype
and invocation.
!
Caution The programmer must state the arguments in appropriate order.
If an argument is to be misplaced, a null argument should be used to preserve the
proper order in macro invocation statement.
Example: Presume a macro instruction GENER has 10 possible parameters, but
in a specific invocation of the macro only the 3rd and 9th parameters are to be mentioned.
The statement is GENER , DIRECT,,,,,,3.
It is not appropriate if a macro has a huge number of parameters, and only anew of
these are agreed values in a classic invocation.
Keyword parameters
Every argument value is written with a keyword that names the corresponding
parameter.
Arguments may emerge in any order.
Null arguments no longer need to be used.
If the 3rd parameter is named &TYPE and 9th parameter is named &CHANNEL, the
macro invocation would be GENER TYPE=DIRECT,CHANNEL=3.
It is simpler to read and much less error-prone than the positional method.
Consider the Example
Here every parameter name is followed by equal sign, which determines a keyword
parameter and a default value is mentioned for some of the parameters.
104 LOVELY PROFESSIONAL UNIVERSITY