Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax for array class
Message
From
21/11/2002 02:58:11
 
 
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:
00725060
Views:
15
Hi!

It would be very nice ER to allow in next versions of VFP if not multi-dimentional arrays, then _Assign method for array property accept as many parameters as indexes specified inside of "[]". Yet it gives "Invalid Subscript" error if I include 3-d index for array. It would be good to check this only when there are no _Assign. This way native syntax for multi-dimentional arrays would be possible...

>I am working - just for fun - on a class to support multidimensional arrays, that is, arrays with more than 2 dimensions.
>
>I have quite a clear idea about how the class should work internally, and the prototype works fine. My question is, what would be the best syntax for some of the methods of this class. My current prototype works something like the following example; perhaps somebody can comment on whether the syntax, for the end-user, is appropriate or not:
>
>
>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.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform