Files
Eremey Valetov dd7caf89f6 Accept the 1954 tape and drum formulas, and check an assigned GO TO.
FORTRAN 0 now parses the parenthesized tape and drum statements.
Both tape spellings share one binary record. A drum address is 1..2048
and a transfer may not pass the last word. The read walks the list
once, so a bound stored earlier in that list is the bound that applies.
Section K follows the labeled example rather than the words "opposite"
and "last", which reject it.

An assigned GO TO inside a DO, under FORTRAN I and II, must aim at one
part of the nest or entirely outside it. The local i704 tree still has
no FORTRAN listing.
2026-11-12 16:21:15 -05:00

34 lines
752 B
FortranFixed

C FORTRAN 0 DRUM. STDOUT IS THIS RUNTIME.
DIMENSION B(10, 2, 2), D(2), A(2), C(2)
N = 0
DO 10 K = 1, 2
DO 10 J = 1, 2
DO 10 I = 7, 10
N = N + 1
10 B(I, J, K) = N
N1 = 7
N2 = 10
WRITE DRUM (1, 1) (B(I, J, K), I = N1, N2, J = 1, 2, K = 1, 2)
READ DRUM (1, 1) X
PRINT X
LOC = 2048
WRITE DRUM (1, LOC) 11
READ DRUM (1, 2048) M
PRINT M
D(1) = 12.0
WRITE DRUM (2, 3) D(1)
READ DRUM (2, 3) Y
PRINT Y
A(1) = 1.0
A(2) = 2.0
C(1) = 3.0
C(2) = 4.0
WRITE DRUM (3, 1) (A(I), I = 1, 2), (C(J), J = 1, 2)
READ DRUM (3, 1) P, Q, R, S
PRINT P
PRINT Q
PRINT R
PRINT S
STOP
END