This code should write all 1's to the file, yet it writes 1's for a while and then 0's. If you move the dim to outside the loop (only dim it once) it works properly.
`uncomment this dim and comment the other and the code works perfectly
`dim test(4,4,300)
for i = 1 to 4
for j = 1 to 4
for k = 1 to 300
dim test(4,4,300)
test(i,j,k) = 1
next k
next j
next i
if file exist("dim_bug.txt") = 1 then delete file "dim_bug.txt"
open to write 1, "dim_bug.txt"
for i = 1 to 4
for j = 1 to 4
for k = 1 to 300
write string 1, str$(k)+" : "+str$(test(i,j,k))
next k
write string 1, ""
next j
write string 1, ""
next i
close file 1
The size of the array also effects where it fails. Change the 300 size to 1040 and the failure point moves from around 60 to 108.
This has all of my projects pretty much dead in the water.
[edit] I tracked this back all the way to U6.0 here 0_o Wonder why it hasn't been a problem before. Guess it's just a certain combination. I thought this had been posted and fixed a pretty good while ago, but can't find any of the old threads.
[edit2] Found out why I haven't ran into this before ... it only breaks when you have more than 2 demensions.