Files
Eremey Valetov 80c8d09015 Accept the 1954 relative-constant, frequency, and variable GO TO forms.
RELATIVE CONSTANTS marks fixed-point names for the printed page 8
subscript rule. FREQUENCY is parsed as the three estimates and ignored,
so results stay the same. GO TO n jumps to the formula number stored
in a fixed-point variable. FORTRAN I and II still reject the first and
the third, and they still accept any FREQUENCY tail.
2026-11-13 18:13:51 -05:00

58 lines
1.2 KiB
FortranFixed

C FORTRAN 0 SUBSCRIPTS FROM PRINTED PAGES 8 AND 9.
C STDOUT IS THIS RUNTIME. NOT AN I704 LISTING.
DIMENSION A(100), B(20, 5), C(10, 10), D(3, 4, 3)
DIMENSION IX(4), KY(4), N2(3, 3), M2(3, 3)
RELATIVE CONSTANTS J, K, NX
I = 2
J = 3
K = 1
L = 2
NX = 2
IX(1) = 4
IX(2) = 2
IX(3) = 20
IX(4) = 40
KY(1) = 3
N2(2, 1) = 4
M2(1, 2) = 5
A(I + 1) = 11.0
PRINT A(3)
A(I + J) = 12.0
PRINT A(I + J)
A(NX * I + J) = 13.0
PRINT A(7)
A(2 * NX - I) = 14.0
PRINT A(2)
A(100 - NX * J) = 15.0
PRINT A(94)
A(I * J) = 16.0
PRINT A(6)
A(I + J + K) = 18.0
PRINT A(6)
A(IX(J)) = 21.0
PRINT A(20)
IX(KY(1)) = 22
PRINT IX(3)
A(IX(J + K)) = 27.0
PRINT A(40)
B(3 * IX(L) + 2, J) = 31.0
PRINT B(8, 3)
C(N2(I, J - 2), M2(K, L)) = 41.0
PRINT C(4, 5)
D(I, I + 1, I) = 51.0
PRINT D(2, 3, 2)
A(I) = 1.0
PRINT A(2)
A(4) = 4.0
PRINT A(4)
A(I - 1) = 19.0
PRINT A(1)
A(4 * I) = 23.0
PRINT A(8)
A(2 * I + 9) = 24.0
PRINT A(13)
A(5 * I - 1) = 25.0
PRINT A(9)
STOP
END