|
$TestMacro |
MACRO |
&P1="",&P2="" |
|
|
%IF |
MNULL(&P1) |
|
. |
|
|
|
|
%IF |
MNULL(&P2) |
|
|
DISPLAY |
"P1 and P2 are both null" |
|
|
%ELSE |
|
|
|
DISPLAY |
"P1 is null and P2 is not null" |
|
|
%ENDIF |
|
|
. |
|
|
|
|
%ELSEIF |
MNULL(&P2) |
|
. |
|
|
|
|
DISPLAY |
"P1 is not null and P2 is null" |
|
. |
|
|
|
|
%ELSE |
|
|
. |
|
|
|
|
DISPLAY |
"P1 and P2 are both not null" |
|
. |
|
|
|
|
%ENDIF |
|
|
. |
|
|
|
|
MEND |
|
|
. |
|
|
|
........................................................... |
|
|
$TestMacro |
|
|
........................................................... |
|
|
$TestMacro |
"First" |
|
........................................................... |
|
|
$TestMacro |
"First","Second" |
|
........................................................... |
|
|
$TestMacro |
,"Second" |