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

20 lines
638 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 arguments chain their arguments -- so 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#