IF


ANSI

 

The Conditional Compilation Directives allow the testing of certain conditions to determine if a section of PL/B code is included or excluded from the compilation process. The operandi tested must be equated variables, binary, decimal, hex or octal values. Any number of IFxx directives may be active at any one time but they cannot be nested. All active IFxx directives are deactivated when an XIF directive is encountered. They use the following formats:

 

(1)

IFEQ

{value1},{value2}

;value1 must be = value2

(2)

IFNE

{value1},{value2}

;value1 must not be = value2

(3)

IFGT

{value1},{value2}

;value1 must be > value2

(4)

IFNG

{value1},{value2}

;value1 must not be > value2

(5)

IFLT

{value1},{value2}

;value1 must be < value2

(6)

IFNL

{value1},{value2}

;value1 must not < than value2

(7)

IFGE

{value1},{value2}

;value1 must be > or = to value2

(8)

IFLE

{value1},{value2}

;value1 must be < or = to value2

(9)

IFZ

{value1}

;value1 must be zero

(10)

IFNZ

{value1}

;value1 must not be zero

(11)

IFC

{value1}

;value1 must be zero (IFZ)

(12)

IFS

{value1}

;value1 must not be zero (IFNZ)

(13)

XIF

 

;Terminates all preceding IF structures

 

Where:

value1

Required. A previously EQUATEd label, binary, decimal, octal, hexadecimal value that is evaluated.

value2

Required. A previously EQUATEd label, binary, decimal, octal, or hexadecimal value that is evaluated.

Flags Affected: NONE

 

 

See Also: Example Code, %IF, Compiler Directives

 



PL/B Language Reference FDECLARED %IF