Evaluate
Mon 01 January 2018Syntax
Evaluate left_term When [relop_1] right_term_1 [statement_list] . . . [When [relop_n] right_term_n [statement_list]] [When-Other [statement_list]] End-Evaluate
Description
Use the Evaluate statement to check multiple conditions. It takes an expression, left_term , and compares it to compatible expressions ( right_term ) using the relational operators ( relop ) in a sequence of When clauses. If relop is omitted, then = is assumed. If the result of the comparison is True, it executes the statements in the When clause, then moves on to evaluate the comparison in the following When clause. It executes the statements in all of the When clauses for which the comparison evaluates to True. If and only if none of the When comparisons evaluates to True, it executes the statement in the When-other clause (if one is provided).
To end the Evaluate after the execution of a When clause, you can add a Break statement at the end of the clause.