Files
gw-basic-2026/tests/programs/on_goto.bas
T

12 lines
187 B
QBasic
Raw Normal View History

10 REM ON GOTO/GOSUB test
20 FOR I = 1 TO 3
30 ON I GOTO 100, 200, 300
40 NEXT I
50 END
100 PRINT "Branch 1"
110 GOTO 40
200 PRINT "Branch 2"
210 GOTO 40
300 PRINT "Branch 3"
310 GOTO 40