11-08-2018, 06:21 PM
Hi all
I think I've just found a bug in 1.8.8 (or just my Spectrum emulators doesn't work any more); please, look at this piece of code:
If I compile the code without the --debug-array parameter, the code works well; but if the --debug-array parameter is used, the Spectrum can create the "testarray" array, but it can't initialize the arrays values, giving a 3 Subscript wrong, 40:1 error. Array-base is 0, heap-size is 4768 and ORG is 24576, but tried with other values and still fails.
![[Image: errore.jpg]](https://preview.ibb.co/hra2AA/errore.jpg)
Any ideas? Thanks and cheers.
I think I've just found a bug in 1.8.8 (or just my Spectrum emulators doesn't work any more); please, look at this piece of code:
Code:
paper 0: border 0: bright 1: ink 7: cls
DIM y as byte
dim testarray(4,2) as byte
print at 0,0; "Creacion de testarray OK";
for y = 0 to 4
testarray(y,0) = 0
testarray(y,1) = 1
testarray(y,2) = 2
next y
print at 1,0; "Inicializacion de testarray OK";
for y = 0 to 4
print at y+5,0; testarray(y,0);
next y
print at 2,0; "Lectura de valores OK";
If I compile the code without the --debug-array parameter, the code works well; but if the --debug-array parameter is used, the Spectrum can create the "testarray" array, but it can't initialize the arrays values, giving a 3 Subscript wrong, 40:1 error. Array-base is 0, heap-size is 4768 and ORG is 24576, but tried with other values and still fails.
![[Image: good.jpg]](https://preview.ibb.co/dSxzqA/good.jpg)
![[Image: errore.jpg]](https://preview.ibb.co/hra2AA/errore.jpg)
Any ideas? Thanks and cheers.