IF...THEN...ELSE

When Enrichment encounters an IF THEN ELSE instruction, it evaluates the logical expression in the IF clause. If it is TRUE, then the instructions that follow are executed. If it is FALSE, then the first ELSEIF logical expression is similarly evaluated. This continues for all ELSEIF clauses. If no logical expression is TRUE, then the ELSE clause, if any, is executed.

A simple IF/THEN/ELSE instruction is shown below.

IF logical-expr-1 THEN
   statements-1
ELSEIF logical-expr-2 THEN
   statements-2
ELSE 
   statements-3
Note: The ELSEIF clause can be omitted or can be repeated as many times as desired. The ELSE clause can also be omitted.