Forum
Incorrect values asigned to an uinteger matrix (*solved*) - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: Incorrect values asigned to an uinteger matrix (*solved*) (/showthread.php?tid=513)



Incorrect values asigned to an uinteger matrix (*solved*) - wilco2009 - 12-15-2012

Si se compila el siguiente fragmento de código el resultado es muy diferente del esperado:
Code:
Dim obj(15) as uinteger

for i = 0 to 15
   obj(i) = 9999
   Print Obj(i)
nex i

Si ahora consultas el resultado del array de objs, en lugar de contener todos los elementos 9999 contienen el valor 255.

Compiling the following code, the value of the matrix elements is totally diferent to the expected one:
Code:
Dim obj(15) as uinteger

for i = 0 to 15
   obj(i) = 9999
   Print Obj(i)
nex i

All the elements of the obj matrix are now 255 instead 999.
Using a intermediate scalar variable the result is correct.

NOTE: Bug fixed in the new version 1.3.0s952


Re: Incorrect values asigned to an uinteger matrix - boriel - 12-18-2012

That's right.
It was a silly bug fixed in version 1.3.0s952.
Please, download and check it.