IBM 1130 User Manual page 547

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

Advertisement

Section
Subsections
Page
70
40
I
10
02
A1 to Real -- GET
IBM supplies the GET function as part of the 1130
Commercial Subroutine Package (CSP). The original
A1 data may have resulted from a FORTRAN READ
with an A1 FORMAT, or from use of one of the CSP
Over lapped Input routines, which always results in
A1 format.
If
you have a five-place array, in A1 format
and you say
then X
=
19868.
K(l)
= 1
K(2)
=
9
K(3)
=
8
K(4)
=
6
K(5)
=
8
x =
GET(K, 1, 5, 1. 0)
The last parameter (1. 0) is a shift factor, and
will usually be 1. 0 if you want accurate results.
(If
it had been. 1, X would be 1986.8; however, since
the fraction . 8 is present, you could expect it to be
inaccurate.) Subsection 70. 10.20 explains why
fractions should be avoided in commercial work.
Basically, the above use of GET can be thought
of as equivalent to an F5. 0 in a FORMAT statement.
A shift factor of .1 would be an F5. 1; a shift of .01
would be F5. 2; a shift of .001 would be F5. 3; etc.
A1 to Integer
As shown in Figure 70.23, this step requires use
of both IFIX and GET, in the following manner:
J
=
IFIX(GET(K, 10,12,1. 0»
where positions 10 through 12 of the K array are
converted first to a real number, then to an integer
called J.

Advertisement

Table of Contents
loading

Table of Contents