A control formula inside a FORTRAN 0 DO that names that DO steps the index. FORTRAN I and II drop the frame and start again at the initial value, even when an inner frame's extended range contains the DO statement. An arithmetic store of a raw word writes the normalized value: the fixed word 12 read into a real becomes zero, and a cell that was not stored still writes 12. A bare WRITE is rejected, because neither manual defines one.
14 lines
272 B
FortranFixed
14 lines
272 B
FortranFixed
C FORTRAN 0: A CONTROL FORMULA THAT NAMES THE DO STEPS THE INDEX.
|
|
K = 0
|
|
1 DO 10, 20, 25 I = 1, 3
|
|
10 K = K + I
|
|
20 GO TO 1
|
|
25 N = 0
|
|
2 DO 12, 22, 32 I = 1, 2
|
|
12 N = N + I
|
|
22 IF (I > 0) 2, 28
|
|
28 N = -1
|
|
32 PRINT K, N
|
|
STOP
|
|
END
|