MGIVING Example


Example:

 

 

MDELM

" "

 

MMODE

BLANKON

$TestMacro

MACRO

&P1="",&P2=""

  

%IF

MGIVING(&P1)

  

DISPLAY

"P1 is specified as 'giving'"

  

%IF

MNULL(&P2)

  

Parameter Error... Second parameter is required!

 

%ELSE

 

 

DISPLAY

"P2 has been specified as a parameter"

  

%ENDIF

 

.

 

 

  

%ELSE

 

.

 

 

  

DISPLAY

"P1 is NOT specified as 'giving'"

.

 

 

  

%ENDIF

 

.

 

 

  

MEND

 

.

 

 

...........................................................

 

$TestMacro

 

...........................................................

 

$TestMacro

giving

...........................................................

 

$TestMacro

giving S$CMDLIN

 

 



PL/B Language Reference