User Guide
IF and the Boolean Expressions
67
Axcess Programming Language
The Boolean expression tables in FIG. 22 are a quick reference guide for the result of a Boolean
expression.
Boolean Keywords
The Boolean keywords supported by Axcess are described below:
FIG. 21 An example of how a Boolean expression table is used to compare multiple conditions.
FIG. 22 Sample Boolean truth table results
Boolean Keywords
SELECT...ACTIVE The SELECT...ACTIVE statement allows easy placement of several branches
from one path.
Syntax:
SELECT
{
ACTIVE (expression 1) : (* Statement 1 *)
ACTIVE (expression 2) : (* Statement 2 *)
ACTIVE (expression 3) : (* Statement 3 *)
(* ...etc. *)
}
Each one of the expressions is evaluated in order, until one is found to be true.
The statements associated with that true expression are then executed, and
the path then flows to whatever statements follow the closing brace. Using a
SELECT...ACTIVE is much preferred to multiple IF...ELSE IF statements, as it
uses less memory and runs faster.
ELSE If the corresponding IF statement is false, the program will jump to this section
of the IF...ELSE set of statements.
See IF for details.
IF
The IF statement provides
conditional branching of pro-
gram flow.
Every IF statement must be followed by an expression enclosed in parenthe-
ses. This provides the beginning of a conditional execution of statements. For
example:
IF (expression)
(* Statement 1 *)
If the expression is true, Axcess executes Statement 1 and then continues with
whatever statements follow. If the expression is false, Statement 1 is ignored. If
Statement 1 is a compound statement, it must be enclosed in braces.