next up previous contents
Next: Computed GOTO Up: GOTO Statements Previous: GOTO Statements

   
Unconditional GOTO

All programs so far have started at the top and worked down to the bottom. The GOTO can break this monotonous regime! The simplest form is the UNCONDITIONAL GOTO. It has the form:-
GOTO statement label
and is demonstrated in the world's shortest and longest program

10      PRINT *,'HELP !'
        GOTO 10
        END

Excercise 4

Type in the above program and run it. When you have seen enough press Ctrl Y once.


n west (APC)
2000-03-08