Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax for array class
Message
De
21/11/2002 20:15:47
 
 
À
20/11/2002 19:44:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00724996
Message ID:
00725564
Vues:
9
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform