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

20 lines
639 B
QBasic

10 REM An array reference used as a function argument, and as one of several.
20 REM An identifier's subscript list used to hang off .right, which is also
30 REM where an argument list chains its arguments; the arity counter walked
40 REM straight into the subscripts and refused the call. TODO.md section 4.
50 DIM C#(4)
60 C#(1) = -9
70 C#(2) = 7
80 PRINT ABS(C#(1))
90 PRINT MOD(C#(2), 4)
100 PRINT MOD(C#(2), C#(1) + 12)
110 DIM S$(2)
120 S$(0) = "HELLO"
130 PRINT LEN(S$(0))
140 PRINT INSTR(S$(0), "LL")
150 REM And a READ into an array element alongside a scalar.
160 READ S$(1), D#
170 DATA "WORLD", 99
180 PRINT S$(1)
190 PRINT D#