Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multidimensional Array
Message
 
 
To
05/02/2002 15:10:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00615684
Message ID:
00617038
Views:
25
>>I think a table solution is in order - I will rewrite
>>
>>You know, I just wish I would have looked at the help before doing all that typing for a three and four dim tab
>
>If you explain what the data you want to store is all about, perhaps we can contribute with a few more crazy ideas.
>
>Hilmar.

Well, I rewrote the app for 2D arrays
Conceptually, the memory is somewhat arranged

mArrayTOP (RowStart,RowEnd,PositionCol,SenderCol,RecieverCol) 2,3
having one or more
mArrayGroup (RowStart,RowEnd,PositionCol,TypeCol) 2,2
having one or more
mArrayTrans (RowStart,RowEnd,PositionCol,DisplayCol,PersonCol,FromCol) 2,4

By not being able to have three dimensional array, I end up whith a lot of unused memory variables, but this works on all tested files.

I found that I can redimension an array by adding rows, but, array elements are not where you would expect them to be if you add a column. So, Array Dimensions must be established up front, usually adding to the overhead.

I used macro substitution to tie the various 'sub-arrays' to its 'parent-array'

* Group limited to 9 per file (j)
For k = 1 to 99 && limit of 99 Transactions per group
cAS= "mArrayTr"+ALLTRIM(STR(j))+AllTrim(Str(k)) && Tie ST to GS
Dimension &cAS(2,3)
Store 0 To &cAS
...process

Works great , but looks complicated!

Thanx
Edgar L. Bolton, B.S. B.B.A.
Previous
Reply
Map
View

Click here to load this message in the networking platform