|
- 10 REM 'GOSUB-OF' TEST PROGRAM
- 20 PRINT "ENTER THE NUMBER 1, 2, OR 3";
- 30 INPUT X
- 35 IF X < 0 THEN 999
- 40 PRINT "THE GOSUB-0F STATEMENT ";
- 50 GOSUB X OF 100, 200, 300
- 60 GOTO 20
- 100 REM SUBROUTINE #1
- 110 PRINT "BRANCHED TO SUBROUTINE #1"
- 120 RETURN
- 200 REM SUBROUTINE #2
- 210 PRINT "BRANCHED TO SUBROUTINE #2"
- 220 RETURN
- 300 REM SUBROUTINE #3
- 310 PRINT "BRANCHED TO SUBROUTINE #3"
- 320 RETURN
- 999 END
|