IF and the Boolean Expressions
Boolean Keywords (Cont.)
IF...ELSE
IF...IF ELSE
68
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.
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.
Axcess Programming Language
Need help?
Do you have a question about the AXCESS CONTROL SYSTEM PROGRAM and is the answer not in the manual?