5.8.8. [ or IF directive

The IF directive introduces a condition that is used to decide whether to assemble a sequence of instructions and/or directives. [ and IF are synonyms.

Syntax

The syntax of IF is:

IF logical-expression
	 ...
{ELSE
	 ...}
ENDIF

where:

logical-expression

is an expression that evaluates to either {TRUE} or {FALSE}.

See Relational operators.

Usage

Use IF with ENDIF, and optionally with ELSE, for sequences of instructions and/or directives that are only to be assembled or acted on under a specified condition. See also | or ELSE directive and ] or ENDIF directive.

IF...ENDIF conditions can be nested. See Nesting directives.

Example

		[ Version = "1.0"								; IF ...
		; code and/or
		; directives
		|								; ELSE
		; code and/or
		; directives
		]								; ENDIF
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C
Non-Confidential