## ALP Programming Guide and Reference

[prev][next][parent][TOC]

### .ERRB/.ERRNB (Error if Argument Blank/Non-Blank)

The .ERRB and .ERRNB directives test the given Text-Argument.

Syntax

    . ERRB   Text - Argument
        or
    . ERRNB   Text - Argument

Remarks

If Text-Argument is blank, the .ERRB directive produces an error. If Text- Argument is not blank, .ERRNB produces an error.

You can test for the existence of parameters by using these directives within macros.

Example

In this example, the directives ensure that only one argument is passed to the macro. If no argument is passed to the macro, the .ERRB directive produces an error. If more than one argument is passed, the .ERRNB directive produces an error.

    WORK      MACRO      REALARG , TESTARG
             . ERRB      < REALARG >    ; ;   Error   if   no   parameters
             . ERRNB     < TESTARG >    ; ;   Error   if   more   than   one   parameter
                      .
                      .
                      .
             ENDM