COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-72
EVALUATE
•
Subject-Object Comparisons
EVALUATE operates as if each corresponding subject and object were
evaluated and assigned one of:
°
A numeric or nonnumeric value
°
A range of numeric or nonnumeric values
°
TRUE
°
FALSE
The subject is determined:
The object is determined:
subject EVALUATE uses …
identifier The value and class of the data item referenced by identifier
literal The value and class of literal
arithmetic expression The numeric value determined by the rules for evaluating
arithmetic expressions
conditional expression The truth value determined by the rules for evaluating
conditional expressions
TRUE TRUE
FALSE FALSE
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