The conditional-assembly directives allow you to include or exclude portions of an assembly depending on how a pair of expressions, or a pair of strings, compare.
The overall structure of conditionals is familiar from many other contexts. .AIF marks the start of a conditional, and precedes assembly for the case when the condition is true.
An optional .AELSE precedes assembly for the converse case, and an .AENDI marks the end of the condition.
You may nest conditionals up to a depth of 100; GASP rejects nesting beyond that, because it may indicate a bug in your macro structure.
Conditionals are primarily useful inside macro definitions, where you often need different effects depending on argument values.
See Defining your own directives for details about defining macros.
EQ
Are expra
and exprb
equal?
(For strings, are stra and strb identical?)
NE
Are expra
and exprb
different?
(For strings, are stra and strb different?
LT
Is expra
less than exprb?
(Not allowed for strings.)
LE
Is expra
less than or equal to exprb?
(Not allowed for strings.)
GT
Is expra
greater than exprb?
(Not allowed for strings.)
GE
Is expra
greater than or equal to exprb?
(Not allowed for strings.)
.AELSE
Marks the start
of assembly code to be included if the condition fails.
Optional, and only allowed within a conditional (between .AIF and .AENDI).
.AENDI
Marks the end
of a conditional assembly.