![]() |
Serious bug indexing arrays (*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: Serious bug indexing arrays (*solved*) (/showthread.php?tid=604) |
Serious bug indexing arrays (*solved*) - einar - 09-29-2014 Try running this program: Code: DIM score(1 TO 2) AS UBYTE The result will be "SCORE 0x1". This code was supposed to increment the score for player 1, but it will increment it for player 2 instead! Now try changing this program as follows: Code: DIM score(1 TO 2) AS UBYTE Now it will give the correct result "SCORE 1x0". Tested using latest ZX BASIC release 1.4.0s1893. Re: Serious bug indexing arrays - boriel - 09-29-2014 einar Wrote:Try running this program: Thanks, Einar!! Will fix it ASAP!! Re: Serious bug indexing arrays - einar - 09-29-2014 boriel Wrote:Thanks, Einar!! Thank you! Re: Serious bug indexing arrays - boriel - 09-29-2014 Ok. Please, download and try Version 1.4.0s1898 and tell me. :roll: Re: Serious bug indexing arrays - einar - 09-29-2014 boriel Wrote:Ok. Problem solved, thanks a lot!!! |