IF Command

IF — Test for a condition.

Synopsis

IF dataref comparator dataref [ { AND | OR } dataref comparator dataref ...]

Introduction

The IF command tests for a condition and executes a logic block if the condition is met. Structures can be nested. An IF structure should always be closed with an ENDIF statement.

Arguments

data_ref

Valid data reference, string or numeric value.

comparator

=
<
>
<=
>=
<>

Example

. . .
. . .
IF L-Counter > 10
    CALL OrderCompress L-OrderNumber
ENDIF
. . .
. . .

Related Commands

ELSE ELSEIF ENDIF