IBM 1130 User Manual page 534

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Moving Signs
The NS1G N routine may also be used to move signs.
The two statements
CALL NS1GN (NARRY, I, NOLD, NOLD)
CALL NS1GN (KARRY, J,
NOW,
JUNK)
will make KARRY (J) have the same as NARRY (I).
Section
Subsections
Page
70
10
I
30
22
Comparing Decimal Fields
The FUN eTION ICOMP is used to compare two
variable length decimal fields.
In
practice, it is
typically used within the parentheses of an IF state-
ment;
IF (ICOMP (IWORK, 1,5, KWORK, 6, 10))1, 2,3
This statement will compare (IWORK, 1,5) with
(KWORK,6,10), and branch to
Statement 1 if the first is less than the second.
Statement 2 if they are equal.
Statement 3 if the first is greater than the second.
As was true with the ADD and SUB subroutines,
the first field must not be longer than the second.
Since no error code is returned from this sub-
program, there is no way to tell that such an error
has occurred, and the results will therefore be
meaningless.

Advertisement

Table of Contents
loading

Table of Contents