Trailing-Edge
-
PDP-10 Archives
-
FORTRAN-10_Alpha_31-jul-86
-
goto.for
There are 11 other files named goto.for in the archive. Click here to see a list.
PROGRAM GOTO
!COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1981, 1986
!ALL RIGHTS RESERVED.
!
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
!ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
!INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
!COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
!OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
!TRANSFERRED.
!
!THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
!AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
!CORPORATION.
!
!DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
!SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
! Version 7 GOTO.FOR
! 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