basic2c/test_classic.bas
2026-02-21 18:51:40 -06:00

17 lines
405 B
QBasic

' Classic BASIC with line numbers
' Tests GOTO, GOSUB/RETURN, and line-numbered code
10 DIM x AS INTEGER
20 x = 1
30 PRINT "Start"
40 GOSUB 100
50 PRINT "Back from first gosub, x="; x
60 GOSUB 100
70 PRINT "Back from second gosub, x="; x
80 GOTO 200
90 PRINT "This should not print"
100 x = x + 10
110 PRINT "In subroutine, x="; x
120 RETURN
200 PRINT "After GOTO, x="; x
210 PRINT "Classic BASIC done!"