COBOL Manual for TNS/E Programs (H06.03+)
Procedure Division
HP COBOL Manual for TNS/E Programs—520347-003
8-64
Complex Conditions
•
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).
Complex Conditions
A complex condition is a combination of simple conditions and any of the logical
operators NOT, AND and OR. Its truth value is the one that results from the interaction
of the stated logical operators on the individual truth values of the simple conditions or
conditions enclosed within parentheses.
A complex condition formed by applying the unary operator NOT to a simple or
parenthetical condition is called a negated condition. A complex condition formed by
applying the binary operator AND or OR to two conditions (either of which can be
simple or parenthetical) is called a combined condition.
Negated Conditions
simple-condition
is described in Simple Conditions.
Example 8-14. Sign Conditions
( A - 10 ) IS POSITIVE
B NOT ZERO
Table 8-17. Logical Operators
Operator
MeaningSymbol Kind
NOT Unary Logical negation (reversal of truth value): The truth value is TRUE if the
condition is FALSE, FALSE if the condition is TRUE
AND Binary Logical conjunction: The truth value is TRUE if both conjoined
conditions are TRUE, FALSE if one or both conjoined conditions are
FALSE
OR Binary Logical inclusive OR: The truth value is TRUE if one or both included
conditions are TRUE, FALSE if both included conditions are FALSE
NOT
simple-condition
condition
( )
VST122.vsd










