Files
akbasic/tests/language/flowcontrol/forloopwaitingforcommand.bas
Logikoma 8a02674af5
All checks were successful
akbasic CI Build / cmake_build (push) Successful in 3m34s
akbasic CI Build / coverage (push) Successful in 4m4s
akbasic CI Build / sanitizers (push) Successful in 6m59s
akbasic CI Build / akgl_build (push) Successful in 7m57s
akbasic CI Build / mutation_test (push) Successful in 23m28s
Move BASIC fixtures into the editable language corpus
Move every program and expectation out of tests/reference and register the unified tests/language corpus as local cases. Remove the old immutable-corpus protections from build, maintenance, and documentation paths.

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

13 lines
601 B
QBasic

10 REM This shows the waitingForCommand utility in the BasicEnvironment
11 REM We have a FOR loop here with a condition where the loop should
12 REM not execute at all. But because the checking of the conditional is
13 REM delayed until the bottom of the loop, we run the risk of the
14 REM runtime executing every line between FOR ... NEXT even though it
15 REM shouldn't. waitingForCommand prevents this from occurring
20 FOR I# = 1 TO 1
30 PRINT "waitingForCommand FAILS if this is seen"
40 NEXT I#
50 FOR I# = 1 TO 2
60 PRINT "waitingForCommand PASS if this is seen"
70 NEXT I#
80 QUIT