Trailing-Edge
-
PDP-10 Archives
-
BB-4157E-BM
-
fortran-test/goto.for
There are 11 other files named goto.for in the archive. Click here to see a list.
PROGRAM GOTO
! This software is furnished under a license and may only be used
! or copied in accordance with the terms of such license.
! Copyright (C) 1981 by Digital Equipment Corporation
! Version 6 GOTO.FOR March 81
! Basic test of GOTO statement.
! GOTO 110 should not be taken, but GOTO 120 should.
X=3
100 IF (X.NE.3) GOTO 110
GOTO 120
110 TYPE 115
115 FORMAT(' ?Error 100. GOTO was taken')
120 CONTINUE
! GOTO 210 should be taken.
200 IF (X.EQ.3) GOTO 210
TYPE 205
205 FORMAT(' ?Error 200. GOTO not taken')
210 CONTINUE
! GOTO 340 should be executed.
I=4
300 GOTO (310,320,330,340,350,360),I
310 CONTINUE
320 CONTINUE
330 CONTINUE
350 CONTINUE
360 CONTINUE
TYPE 370
370 FORMAT(' ?Incorect calculated GOTO taken')
340 CONTINUE !This is where we should be branch.
STOP
END