(Contents)(Previous)(Next)

The CASE Statement

The CASE statement can be used to select a statement depending on the current value of the specified expression. The statement specified by the corresponding selector value is executed. After that, the execution is continued with the next statement after the CASE statement.

As selector value, any expression, including an interval, enumeration or NULL value may be specified. Since the value of the selector can only be determined at runtime, no check is made whether a selector value is defined more than once. If this is the case, the statement after the first occurrence of the selector value is executed.

As an option, an OTHERWISE branch can be defined which is chosen when the current value of the expression does not occur as selector.

Example:

Syntax:


(Contents)(Previous)(Next)