COBOL Manual for TNS and TNS/R Programs
Procedure Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
8-63
Simple Conditions
Sign Conditions
The sign condition determines whether the algebraic value of an arithmetic expression
is less than, greater than, or equal to zero.
arithmetic-expression
is an arithmetic expression, as described in Arithmetic Expressions.
Usage Considerations:
•
NOT Modifier
When NOT appears, it and the next keyword are considered to form a single sign
condition. For example, NOT ZERO is a truth test that determines if the operand
value is nonzero (is positive or negative).
•
Definition
An operand is positive if its value is greater than zero, negative if its value is less
than zero, and zero if its value is equal to zero.
•
Expression Cannot Be Composed Entirely of Literals
The arithmetic expression must contain at least one variable operand (at least one
operand that is not a literal).
Example 8-14. Sign Conditions
( A - 10 ) IS POSITIVE
B NOT ZERO
arithmetic-expression
POSITIVE
NEGATIVE
ZERO
IS NOT
VST121.vsd