Each conditional directive can be used with the ELSE directive to provide the statements to be considered for conditional assembly. The ELSE directive allows the assembly of the statements following it when the IFxx condition or intervening ELSEIFxx conditions are false.
Syntax
IFxx . . . [ELSEIFxx] (optional) . . . [ELSE] (optional) . . . ENDIFRemarks
There is a corresponding ELSEIFxx directive to match all forms of the IFxx family of directives:
Any number of ELSEIFxx blocks may be used within a given IFxx statement. Only one ELSE block is permitted for a given IFxx. A conditional directive with more than one ELSE or an ELSE without a conditional directive causes an error. ELSE does not have an operand.
Note: The conditional directives can be nested to any level. They are not limited to use within a macro. Any operand to a conditional must be known on pass 1 to avoid errors and incorrect evaluation.
IF DEFBUF BUF DB 100 DUP(0) ELSE EXTERN BUF:BYTE ENDIF