Posts: 3
Threads: 0
Joined: Apr 2022
Reputation:
0
Have you considered a 2 dimensional array (multidimensional array), with the first dimension being the "number" of the array, and the second being the true array values.
' set x and y to needed values before the dim is executed
x=5 ' variable number
y=100 ' elements
dim UA (x,y) ' here you basically have 5 arrays with up to 100 elements each.
Posts: 382
Threads: 56
Joined: Apr 2022
Reputation:
13
Thanks Unatic for this suggestion. A while ago I did try something similar. It's a little bulky.
I find my code produces less errors and quick responses if I avoid multi -multi-dimensional arrays. An array A1( 1 to 100) and A2( 151 to 300) and A3(310 to 425) is a little less confusing on the flow of the data through the code than A(1 to 100, 151 to 300, 310 to 425). In my case would have say 10 ie
A1(..to..), A2(...to..).....>>>......A10(..to..)
and then I run into ReDim situations as more data and routines are added to the code. Rather than ReDimming the existing arrays I have, I tried to have the program create the next array A11(..to..) to accommodate the new stuff being generated by the program but without success. By the way, I gave up on trying to have the code create a new numerical array quite a while ago, it was only recently that the suggestion Execute would work similar to ReDim as in EXECUTE "Dim Shared" + "A11(... to ...)
To my friend who suggested EXECUTE, I told him it works more like KILL