Trailing-Edge
-
PDP-10 Archives
-
FORTRAN-10_V7wLink_Feb83
-
v7do.for
There are 9 other files named v7do.for in the archive. Click here to see a list.
PROGRAM V7DO
C THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
C OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
C
C COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1982, 1983
C August 1981
C CDM
C Test for version 7 DO loops. Increment variables should
C retain their value after the DO loop has executed.
INTEGER IIII(2)
C-100-
J=0
DO 100 I=1,10
J=J+1
100 CONTINUE
IF (J.NE.10) TYPE 110,J
110 FORMAT(' ?Error 110. DO loop only executed 'I4' times.')
IF (I.NE.11) TYPE 120,I
120 FORMAT(' ?Error 120. I='I4', should = 11')
C-200-
M=-4
INCR=-3
N=0
DO 200 J=M,-10,INCR
KVAL=KVAL+J
DO 200 JJJJ=N+1,2
IIII(JJJJ)=JJJJ
JVAL=JVAL+JJJJ
200 CONTINUE
IF (KVAL.NE.-21) TYPE 210,KVAL
IF (J.NE.-13) TYPE 220,J
IF (JVAL.NE.9) TYPE 230,JVAL
IF (JJJJ.NE.3) TYPE 240,JJJJ
210 FORMAT(' ?Error 210. KVAL='I4', should =-21')
220 FORMAT(' ?Error 220. J='I4', should =-13')
230 FORMAT(' ?Error 230. JVAL='I4', should =9')
240 FORMAT(' ?Error 240. JJJJ='I4', should =3')
END