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>
20 lines
638 B
QBasic
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#
|