Files
Eremey Valetov 0aea7d4812 Accept RELABEL in the 1954 subset.
The report cycles one dimension so the subscript that is not 1
becomes the new first element. A later reference, including a name
that shares those words, sees the moved values. FORTRAN I and II
still reject the statement.
2026-11-13 17:09:52 -05:00

21 lines
650 B
FortranFixed

C RELABEL A(1, N, 1) WITH N = 3 ON A 3 BY 4 BY 5 ARRAY.
C A SECOND RELABEL OF THE SAME SUBSCRIPT RESTORES THAT DIMENSION.
C RELABEL A(1, 1, 2) THEN CYCLES THE PLANES.
DIMENSION MAT(3, 4, 5)
MAT(1, 1, 1) = 11
MAT(1, 2, 1) = 21
MAT(1, 3, 1) = 31
MAT(1, 4, 1) = 41
MAT(2, 2, 5) = 22
N = 3
RELABEL MAT(1, N, 1)
PRINT MAT(1, 1, 1), MAT(1, 2, 1), MAT(1, 3, 1), MAT(1, 4, 1)
PRINT MAT(2, 4, 5)
RELABEL MAT(1, N, 1)
PRINT MAT(1, 1, 1), MAT(1, 2, 1), MAT(1, 3, 1), MAT(1, 4, 1)
MAT(1, 1, 2) = 52
RELABEL MAT(1, 1, 2)
PRINT MAT(1, 1, 1)
STOP
END