ILE COBOL Language Reference

Sign Condition

The sign condition determines whether or not the algebraic value of a numeric operand is greater than, less than, or equal to zero.

Sign Condition - Format
 
>>-operand-1--+----+--+-----+--+-POSITIVE-+--------------------><
              '-IS-'  '-NOT-'  +-NEGATIVE-+
                               '-ZERO-----'
 
 
operand

Must be defined as a numeric identifier, or it must be defined as an arithmetic expression that contains at least one reference to an identifier.

+-------------------------------IBM Extension--------------------------------+

The operand can be defined as a floating-point identifier.

+----------------------------End of IBM Extension----------------------------+

An unsigned operand is either POSITIVE or ZERO.

NOT
An algebraic test is executed for the truth value of the sign condition. For example, NOT ZERO is regarded as true when the operand tested is positive or negative in value.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]