Comparison Of Numeric Operands; Comparison Of Nonnumeric Operands - Control Data Corporation 3300 Reference Manual

Computer systems usasi cobol/ master
Table of Contents

Advertisement

4.3.2
COMPARISON OF
NUMERIC OPERANDS
4.3.3
COMPARISONS OF
NONNUMERIC
OPERANDS
60229400
Abbreviation 3: Identical subjects and objects are omitted in a consecutive
sequence of relation conditions.
IF A EQUAL TO B OR A IS GREATER THAN B MOVE C TO A IF A IS
GREATER THAN B ADD B TO A
can be abbreviated to
IF A EQUAL TO B OR IS GREATER MOVE C TO A IF GREATER
ADD B TO A
A comparison of numeric operands results in the determination that the
algebraic value of one is less than, equal to, or greater than the other. The
length of the operands, in terms of number of digits, is not significant.
Zero is considered a unique value regardless of the sign. Comparison of
these operands is permitted regardless of their usage.
A comparison between nonnumeric operands, or one numeric and one non-
numeric operand, results in the determination that one is less than, equal
to, or greater than the other with respect to a specified collating sequence of
characters.
The size of an operand is the total number of characters in the operand.
Numeric and nonnumeric operands may be compared only when their usage
is the same, implicitly or explicitly.
Operands of Equal Size
Characters in corresponding positions of the two operands are compared
from the high-order end through the low-order end.
If
all pairs of
characters compare equally, the operands are considered equal.
The first pair of unequal characters to be encountered is compared to
determine their relative position in the collating sequence. The operand
that contains the higher character in the collating sequence is considered
to be the greater.
4-9

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 3300 and is the answer not in the manual?

This manual is also suitable for:

3500

Table of Contents