QB64 Phoenix Edition
Execute ??? - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10)
+---- Thread: Execute ??? (/showthread.php?tid=2373)

Pages: 1 2


RE: Execute ??? - Unatic - 01-03-2024

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.


RE: Execute ??? - Dimster - 01-03-2024

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


RE: Execute ??? - aurel - 01-04-2024

huh..this looks like experiment with custom data container
or you need linked list Big Grin

or to track array "number" you need array identifier