GOTO (List of statement labels) expressionFor example :-
GOTO (10,23,10,50) IIf I has the value 1 then the program jumps to statement 10, if it has the value 2 it goes to 23 and so on. If I has a value less than 1 or greater than the number of labels in the list the GOTO is ignored. If the expression is a real it is converted to an integer before testing.
PRINT *,'PLEASE TYPE A NUMBER BETWEEN 1 AND 3' 10 READ *,I GOTO (20,30,40) I PRINT *,'YOU ARE NOT PAYING ATTENTION, TRY AGAIN!' GOTO 10 20 PRINT *,'YOU TYPED ONE' STOP 30 PRINT *,'YOU TYPED TWO' STOP 40 PRINT *,'YOU TYPED THREE' STOP END
Note that here is a program with several STOP statements.