Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax for array class
Message
From
21/11/2002 20:15:47
 
 
To
20/11/2002 19:44:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00724996
Message ID:
00725564
Views:
8
Is there a max dimension count?
* 4 dimensional call
oArray.PutValue(date(), 2, 1, 5, 8)
* 5 dimensional call
oArray.PutValue(date(), 2, 1, 5, 8, 3)
* etc.
Eventually you run out of parameters. of course, at that point, I pity the person coding that array.... ;)

The only alternate I can think of which doesn't limit you is to make the dimensions a single delimited string parameter,e.g.
* 3 dimensional call
oArray.PutValue(date(), "2,1,5")
>
>set classlib to LargeArray
>
>* Create a 3-dimensional array
>oArray = CreateObject("cLargeArray", 3)
>
>* Save current date at position (2, 1, 5)
>oArray.PutValue(date(), 2, 1, 5)
>
>* Retrieve value saved previously
>? oArray.GetValue(2, 1, 5)
>
>
>In case you wondered, the way the class is designed, it is not necessary to inititalize the array object with a maximum size (as in: dimension MyArray(10, 10), which will later only support subscripts between 1 and 10).
>
>TIA, Hilmar.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform