Files
akbasic/tests/language/housekeeping/verbs.bas
Logikoma eb93bb7da0
All checks were successful
akbasic CI Build / cmake_build (push) Successful in 3m29s
akbasic CI Build / sanitizers (push) Successful in 4m42s
akbasic CI Build / coverage (push) Successful in 3m56s
akbasic CI Build / akgl_build (push) Successful in 8m34s
akbasic CI Build / mutation_test (push) Successful in 18m50s
Fix 80-column fixtures and tutorial expectations
2026-08-04 16:36:27 -04:00

23 lines
689 B
QBasic

10 REM Group B: housekeeping verbs. None is in the Go reference --
20 REM they are on its unimplemented list -- so each meaning 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, 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"