Previous Topic: Implied Subjects and Relational OperatorsNext Topic: ConditionName Flag


Boolean Function

A Boolean function can evaluate to a value of True, False, or Unknown. Boolean functions that can evaluate to Unknown include $ALPHABETIC, $NUMERIC, $VERIFY, and $VERIFY‑DATE.

For example, the built‑in function to determine if an alphanumeric field has valid numeric content, evaluates the Boolean value to True if field1 has a valid numeric value, a value of False if it does not, and a value of Unknown if the value is null.

$NUMERIC(field1)

Therefore, the following conditional statement is satisfied if the function evaluates to True.

IF $NUMERIC(field1)

In the statement, the condition is satisfied if the value returned by the function is False.

IF NOT $NUMERIC(field2)

If field1 or field2 in the preceding statements is null, the function evaluates to Unknown and the condition is not satisfied. The effect of Unknown conditions on IF, SELECT, and LOOP statements is described with each statement.