Text preview for : N27-1269_C28-0328-3_update.pdf part of IBM N27-1269 C28-0328-3 update IBM 140x N27-1269_C28-0328-3_update.pdf
Back to : N27-1269_C28-0328-3_updat | Home
Technical Newsletter File Number 1410/7010-25
Re: Form No. C28-0328-3
This Newsletter No. N27-l269
Date December 30, 1966
Previous Newsletter Nos. None
IBM 1410/7010 FORTRAN
This Technical Newsletter amends the publication IBM 1410/7010
Operating System; FORTRAN, Form C28-0328-3, to include an addi-
tion concerning the SUBROUTINE subprogram.
The attached replacement pages (25-26) should be substituted for
the corresponding pages now in the publication. Text changes are
indicated by a vertical line to the left of the affected text.
Please file this cover letter at the back of the publication. It
provides a method of determining if all changes have been received
and incorporated into the publication.
IBM Corporation, Programming Publications, Dept. 637, Neighborhood Road, Kingston, N. Y. 12401
PRINTED IN U.S.A. N27-l269 (C28-0328-3) Page 1 of 1
Form C28-0328-3
Page Revised 12/30/66
By TNL N27-1269
No card should precede the SUBROUTIXE statement. Machine Indicator Tests
The SUBROUTIXE subprogram may use one or more
The 1410/7010 FORTRAN language provides machine
of its arguments to return values to the calling program.
indicator tests even though machine components refer-
Any arguments so used must appcar on the left side of
enced by the tests do not physically exist. The machine
an arithmetic statement or in an input list within the
indicators, described below, are simulated by SUB-
subprogram. The name of the SUBROUTINE must not be
HOUTINE subprograms located in the System Library.
used as a variablc in its SUBHOUTINE subprogram.
To use any of the following machine indicator tests,
The arguments may be considered dummy variable
the user supplies the proper arguments and writes a
names that are replaced at the time of execution by
CALL statement. In the following listing, i is an integer
the actual arguments supplied in the CALL statcmcnt.
expression, j is an integer variable.
Thc actual arguments must correspond in number,
order, and type to the dummy arguments.
When a dummy argument: is an array name, a DI- GENEHAL FOHM FUNCTION
MENSION statement must appear in the SUBROUTINE SLITE (i) If i = 0, all sense lights are turned off.
subprogram. The corresponding actual argument in the If i= 1, 2, 3, or 4, the corresponding
sense light is turned on.
CALL statement must also be a dimensioned array name.
SLITET (i, j) Sense light i (1, 2, 3, or 4) is tested and
N one of the dummy arguments may appear in an j is set to "I" or "2" if i is on or off, re-
EQUIVALENCE or COMMON statement in the SUBROUTINE spectively. After the test, sense light i is
subprogram. turned off.
Like the FUNCTION subprogram, the SUBROUTINE sub- OVERFL (j) This indicator is on if an arithmetic op-
program must return control to the calling program by eration with real variables and constants
results in an overflow condition; that is,
a RETURN statement. if an arithmetic operation (of type rcal)
An END statement is also required. produced a result whose value is greater
than (1-10-- f) X 109H. If the indicator
is on, j is set: to "1"; if off, j is set to
Subprogram Names as Arguments - The EXTERNAL "2." The indicator is set to off after the
Statemenlt test is made.
Subprogram names may be used as the actual argu- DVCHK(j) This indicator is set on if an arithmctic
ments in the calling program. In order to distinguish operatioIl with rcal constants and vari-
ables results in the attempt to divide by
these subprogram names from ordinary variables when zero; j is set to "I" or "2" if thc indicator
they appear in an argument list, their names must is on or off, respcctively. Thc indicator
appear in an EXTERNAL statement (see "The Specifica- is set to off after thc tcst is made.
tion Statements").
EXAMPLES
CALL SLITE (3)
The CALL Statenlent CALL SLITET (K*J, L)
CALL OVERFL (J)
The CALL statement is used only to call a SUBROUTINE
CALL DVCHK (I)
subprogram.
As an example of how the sense lights can be used
General Form
in a program, assume that the statements CALL SLITE (I)
CALL name (aI, <12,