Files
akbasic/tests/language/housekeeping/verbs.bas

23 lines
734 B
QBasic
Raw Normal View History

10 REM Group B: the housekeeping verbs. None of these is in the Go reference --
20 REM they are on its own unimplemented list -- so what each one means here is
30 REM a decision, recorded in src/runtime_housekeeping.c beside the verb.
40 A# = 1 : B# = 2
50 PRINT A# : PRINT B#
60 SWAP A#, B#
70 PRINT A# : PRINT B#
80 REM SWAP exchanges the variables, so an array goes with its dimensions.
90 DIM P#(3)
100 DIM Q#(3)
110 P#(2) = 7 : Q#(2) = 9
120 SWAP P#, Q#
130 PRINT P#(2) : PRINT Q#(2)
140 REM TRON prints each line number inline before the line runs, as a C128 does.
150 TRON
160 PRINT "TRACED"
170 TROFF
180 PRINT "NOT TRACED"
190 REM CLR drops the variables and keeps the program.
200 CLR
210 PRINT A#
220 PRINT "STILL RUNNING"