IBM 1620 Manual page 37

Hide thumbs Also See for 1620:
Table of Contents

Advertisement

just the number of positions of the card that you want to bring into the
program. In this example, if the specification for K had been 14, the proc-
essor would assume that the value for K was located in columns 1 to 4,
that the value for M was punched beginning with column 5, and that the
value of A was punched beginning with column 12, etc:;thus all subsequent
fields would be read incorrectly.
3. The floating point variable A is read in according to
FORMAT
F7.3. This
format tells the processor that the value is to be a floating point number,
that the field in the card contains 7 columns, and that there will be 3 digits
to the right of the decimal place. The object program will consider A to
have the value of 1234.567, then "place" the decimal point to the left of
the high-order (leftmost) digit, and set the exponent as 04 for this value to
account for the number of positions that the decimal point is shifted.
4. The"floating point variable B is read in according to
FORMAT
F12.0. This
format tells the processor that the value is a floating point number, and
that the field in the card contains 12 columns. Because the decimal point
is punched in the card in its proper place, a specification for d is not re-
quired, and if specified will be ignored by the object program. The maxi-
mum size of a mantissa in a floating point number is 8 positions, so the low-
order positions of the quantity are truncated. When the value is stored, the
decimal point is adjusted six places and the exponent is set to 06.
5. Columns 33 through 50 contain blank columns and punched data that are
not required in the program. These columns are read into the record by
giving the processor the specification 18X. Even though this data may not
be used by the program, it will be punched or printed in an output
record if the same
FORMAT
statement is used for both input and output.
The maximum number of columns that can be read with this specifica-
tion is 49.
6. The floating point variable C is punched into the card using a standard
mathematical-like notation; that is, the decimal point has been adjusted to
a specific location and the magnitude of the quantity is given by punching
the exponent in the columns following the value. The
FORMAT
for C,
E12.0, tells the processor that the value is in floating point mode with an
exponent to indicate its magnitude, and that the field in the card contains
12 columns. Because the decimal point has already been punched into
the card, the specification d is ignored. The object program will assume
that C has a value of -123456.7 by noting where the decimal is punched
in the field and what the value of the exponent is. When the value is
stored, the decimal is adjusted to the left of the high-order digit, and the
exponent is set to the new value of 06.
7. The floating point variable D is punched into the card as a 2-digit man-
tissa with an exponent. A decimal point is not punched. The
FORMAT
for
D, E5.1, tells the processor that the value is to be in floating point mode
with an exponent, that the field in the card contains 5 columns, and that
there will be one digit to the right of the decimal point. The object pro-
gram will consider D to have the value of 12000. When the value is stored,
the decimal is adjusted to the left of the high-order digit and the exponent
is set to the new value of 05.
There are no more variables in the list, so columns 68 and 72 are ignored.
Writing the 1620 FORTRAN Program
37

Advertisement

Table of Contents
loading

Table of Contents