Files
akbasic/tests/language/housekeeping/verbs.bas
Logikoma 7d0ec1fe83
All checks were successful
akbasic CI Build / cmake_build (push) Successful in 3m50s
akbasic CI Build / coverage (push) Successful in 4m4s
akbasic CI Build / sanitizers (push) Successful in 4m48s
akbasic CI Build / akgl_build (push) Successful in 9m55s
akbasic CI Build / mutation_test (push) Successful in 17m50s
Keep BASIC fixtures within the input line limit
Reflow the approved reference cases, shorten local fixture comments, and split the executable docs line so the 80-byte input buffer can read every source line.

Co-authored-by: andrew <andrew@aklabs.net>
2026-08-04 16:12:42 -04:00

23 lines
696 B
QBasic

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