Q: Consider the following program:
$MACRO MA parameter a; $MACRO MXY parameter x; \ MA \ parameter y; MXY
This does not work because the macro MXY
contains:
parameter x;MAparameter y;
and the name MAparameter
is unknown.
Answer: Try:
$MACRO MA parameter a; $MACRO MXY parameter x; &\ MA & \ parameter y; MXY
When storing a macro, leading and trailing blanks are removed from each line. The recognition of macros and expansion of arguments can further be controlled by the use of ampersands (&) in the macro body. A single ampersand (&) is used as a concatenation or separation symbol to recognize tokens to be replaced. Two ampersands (&&) immediately preceding a token will drop the most outer matching single or double quotes of the replacement argument.