IF Statement

The IF statement can be used in the Expression (113) command. It is used for conditional branching only within the Expression command.

Format

IF condition THEN

statements

ELSIF condition THEN

statements

ELSE

statements

END_IF

Notes

Each statement must end with a semicolon (;).

An ELSE cannot precede an ELSIF.

The ELSE and ELSIF are optional.

The spelling ELSIF and ELSEIF are both supported and are equivalent.

Example

Example 1

Example 2

Example 3

 

See Also

Expressions Overview


Send comments on this topic.

Copyright © 2026 Delta Computer Systems, Inc. dba Delta Motion