IF Statement

The IF statement either runs or skips a sequence of one or more statements, depending on the value of a BOOLEAN expression.

Topics

Syntax

Semantics

boolean_expression

Expression whose value is TRUE, FALSE, or NULL.

The first boolean_expression is always evaluated. Each other boolean_expression is evaluated only if the values of the preceding expressions are FALSE.

If a boolean_expression is evaluated and its value is TRUE, the statements after the corresponding THEN run. The succeeding expressions are not evaluated, and the statements associated with them do not run.

ELSE

If no boolean_expression has the value TRUE, the statements after ELSE run.

Examples

Related Topics

In this chapter:

In other chapters: