The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible array bug in version 1.8.8 (*solved*)
#8
Tried the win32 version and I couldn't reproduce previous errors with the same code, so it looks good Smile
For instance, this is another piece of code used to test the bug:

Code:
paper 0 : border 0: ink 7: cls dim y,x,n,m as uinteger DIM array1d(100) as ubyte DIM array2d(23,31) as ubyte for y = 0 to 100 array1d(y) = y ink (rnd*7)+1 print "y="; y, "array("; y; ")="; array1d(y), next y n = 22528 print at 0,0 for y = 0 to 23 for x = 0 to 31 array2d(y,x) = n n = n + 1 print "array("; y; ","; x; ")="; array2d(y,x) next x next y

One dimension arrays always breaks if I tried to access third position or further (so 0 and 1 were OK but 2 gives the Out of Range error) and two dimension arrays always breaks if I tried to access four rows positions or further (so 0,0 1,0 2,0 were good, but 3,0 fails) And it doesn't matter if Array Base is changed or the array was defined like array(5 TO 10) In this case, trying to access array(7) gives the error. But now with 1.8.9 beta4, looks like all these errors are gone Big Grin

Cheers
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)