Skip to content

Commit d23e568

Browse files
committed
Add runtime test for arrays
This one detects further error cases that the others didn't (wrong index multiplication under some circumnstances).
1 parent 8a3ff5a commit d23e568

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tests/runtime/arrcheck3.bas

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
DIM a(23, 31) as Uinteger
3+
DIM p as UInteger = @a(0, 0)
4+
DIM i as Uinteger
5+
DIM j as UInteger
6+
DIM m as UInteger
7+
CLS
8+
9+
FOR i = 0 TO 23
10+
FOR j = 0 TO 10
11+
LET m = i * 32 + j
12+
PRINT i; ","; j; " "; m; " "; @a(i, j); " "; p
13+
LET p = p + 2
14+
NEXT j
15+
STOP
16+
NEXT i
17+
18+
PRINT INK 4; FLASH 1; " OK "
19+

0 commit comments

Comments
 (0)