12-21-2017, 08:34 AM
When you use an array to hold your variables in a SPLIT or TOKEN function, the array gets resized upwards (apparently never downwards) automagically. But when you run a regular routine like this
DIM a(10)
FOR f - 1 TO 11
a(f) = f
NEXT
You will get an "array out of bounds" error.
So, my question is this: Apparently, the code to have autogrowing arrays is already in there. Why should we not be able to use that in regular array operations? Is it just because way back when yabasic was running on 512K of RAM you might run out of memory? If so, is that thinking still relevant? I fed a GB of data into a string array once for testing purposes. Dog-slow, but yab didn't crash.
DIM a(10)
FOR f - 1 TO 11
a(f) = f
NEXT
You will get an "array out of bounds" error.
So, my question is this: Apparently, the code to have autogrowing arrays is already in there. Why should we not be able to use that in regular array operations? Is it just because way back when yabasic was running on 512K of RAM you might run out of memory? If so, is that thinking still relevant? I fed a GB of data into a string array once for testing purposes. Dog-slow, but yab didn't crash.