COBOL Manual for TNS/E Programs (H06.03+)
Procedure Division Verbs
HP COBOL Manual for TNS/E Programs—520347-003
9-65
EVALUATE
The object is determined:
•
Execution of the EVALUATE Statement
Execution of the EVALUATE statement begins with the comparison phase
illustrated in Figure 9-3. A comparison is satisfied if one of these conditions is true:
°
The object is ANY (and the value of the subject is irrelevant).
°
The corresponding subject and object were both assigned TRUE or both
assigned FALSE.
°
The corresponding subject and object were assigned the same type of
values (numeric or nonnumeric) and the value assigned to the subject is
equal to the value (or within the range of values) assigned to the object,
according to the rules for comparison defined for a relation condition (see
Relation Conditions in General).
If each comparison in an object-list is satisfied, the object-list
“qualifies.” After the comparison phase ends, execution of the EVALUATE
statement proceeds as shown in Figure 9-4.
object EVALUATE uses …
identifier
(without NOT or THRU)
The value and class of the data item referenced by
identifier
literal
(without NOT or THRU)
The value and class of literal
ZERO or ZEROS or ZEROES
(without NOT or THRU)
The value 0 and the class of the corresponding selection
subject
arithmetic expression
(without NOT or THRU)
The numeric value determined by the rules for evaluating
arithmetic expressions
condition The truth value determined by the rules for evaluating
conditional expressions
ANY No value—ANY matches any selection subject
A range of items specified with
the keyword THRU but without
the keyword NOT
The range of all permissible subject values greater than or
equal to the first operand and less than or equal to the
second operand (if the value of the first operand is greater
than the value of the second operand, there are no values
in the range)
The keyword NOT followed by
an item or a range of items
All permissible subject values not equal to the value, or
not included in the range of values, that would have been
used if the keyword NOT had been omitted
TRUE TRUE
FALSE FALSE










