Files
akbasic/tests/language/arrays_in_parameter_lists.bas

20 lines
644 B
QBasic
Raw Permalink Normal View History

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 -- 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#