Copyright Digital Equipment Corp. All rights reserved.

IF_THEN_ELSE

 The IF statement tests  a  Boolean  expression  and  performs  a
 specified  action  if  the result of the test is TRUE.  The ELSE
 clause, when it appears, executes only  if  the  test  condition
 results to FALSE.


 Syntax:

    IF boolean-expression THEN statement1 [[ELSE statement2]]


 The 'boolean-expression' is any Boolean expression.

 The 'statement1' is the statement to be executed if the value of
 the Boolean expression is TRUE.

 The 'statement2' is the statement to be executed if the value of
 the Boolean expression is FALSE.

 VSI Pascal may not always evalutate all the terms of  a  Boolean
 expression if it can evaluate the entire expression based on the
 value of one term.  Either do not write  code  that  depends  on
 actual  evalution  (or evaluation order) of Boolean expressions,
 or use the AND_THEN and  OR_ELSE  operators  for  a  predictable
 order of evaluation.


Additional information available:

Examples