User Guide
IF and the Boolean Expressions
68
Axcess Programming Language
Boolean Keywords (Cont.)
IF...ELSE The IF...ELSE statements are similar to the basic IF statement, with the addi-
tion of an alternative instruction. If the expression is false, Axcess executes a
statement independent of the true expression. For example:
IF (expression)
(* Statement 1 *)
ELSE
(* Statement 2 *)
If the expression is true, then Statement 1 is executed and Statement 2, under-
neath the ELSE statement, is ignored. If the expression is false, then State-
ment 2 is executed. Statement 1 is automatically ignored if the expression is
false.
IF...IF ELSE The IF...ELSE IF set of statements allow an essentially unlimited number of
paths. Axcess stops at the first true expression and executes the following
statement. Upon completion, it goes on to the rest of the program. For exam-
ple:
IF (expression)
(* Statement 1 *)
ELSE IF (expression)
(* Statement 2 *)
ELSE IF (expression)
(* Statement 3 *)
(* As many Else If statements as memory
allows... *)
A last ELSE statement (not ELSE IF) can be placed at the end as a default
statement. In that case, if Axcess does not find a true IF or ELSE IF statement,
it executes the final ELSE statement. This last ELSE statement is not neces-
sary.