Files
akbasic/tests/language/statements/multiple_per_line.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

18 lines
890 B
QBasic

10 REM Statements separated by colons. The COLON token existed from the start;
20 REM nothing consumed it, so a line could hold only one statement.
30 PRINT "A" : PRINT "B"
40 A# = 1 : B# = 2 : PRINT A# + B#
50 REM Empty statements are valid: a trailing separator or runs of them.
60 PRINT "C" :
70 PRINT "D" :: PRINT "E"
80 REM Everything after THEN belongs to the condition, as in BASIC 7.0, and is
90 REM not something the reference had an opinion about -- it never got here.
100 IF 1 == 1 THEN PRINT "TRUE-1" : PRINT "TRUE-2"
110 IF 1 == 0 THEN PRINT "NEVER-1" : PRINT "NEVER-2"
120 REM With an ELSE, the tail belongs to the ELSE instead.
130 IF 1 == 1 THEN PRINT "T" ELSE PRINT "E" : PRINT "E-TAIL"
140 IF 1 == 0 THEN PRINT "T" ELSE PRINT "E" : PRINT "E-TAIL"
150 REM A colon does not confuse a bare verb that takes no argument.
160 PRINT : PRINT "AFTER A BARE PRINT"
170 PRINT "DONE"