Else (conditional assembly) – Echelon Neuron User Manual
Page 147

ELSE (Conditional Assembly)
The Neuron assembler provides the following directives for conditional control of
the assembly of blocks of source lines: IF, IFDEF, IFNDEF, ELSE, and
ENDIF.
A conditional assembly block begins with the IF, IFDEF, or IFNDEF directive,
and ends with a matching ENDIF directive. A conditional block can contain at
most one matching ELSE directive.
The ELSE directive changes the state of the conditional assembly. If the
assembler is currently assembling source lines when it encounters an ELSE
directive, it skips subsequent source-code lines, up to the matching ENDIF
directive. If the assembler is currently skipping source-code lines because of an
IF, IFDEF, or IFNDEF condition, it begins assembling subsequent lines, up to
the matching ENDIF directive.
Conditional assembly directives can be nested. Thus, a group of source-code lines
between an IF directive and a matching ELSE or ENDIF can contain additional
IF, IFDEF, or IFNDEF directives, and ELSE directives, as long as there are an
identical number of matching ENDIF directives. The maximum number of
nested directives is five. The total maximum number of conditional IF, IFDEF,
and IFNDEF directives for a single source file is 256.
Source-code lines that the assembler skips because of conditional assembly must
still conform to the Neuron assembler syntax.
Syntax:
The ELSE directive has no arguments and cannot have a label. The ELSE
directive must be preceded by a matching IF, IFDEF, or IFNDEF directive.
ELSE
Neuron Assembly Language Reference
137