Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I Store an Array in a Custom Object?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00137989
Message ID:
00137990
Vues:
16
>Greetings!
>
>I have a custom object that I use to store variables, which I think is so much better than having a lot of public variables.
>
>Is it possible to store an array in a custom object? After adding the property in the object, any attempt to dimension it results in a " is not an array" error message. The variable is initialized as logical by default, and I do not know how to set its default to an array. It SEEMS that the only way to have a globally-accessible array is to just make it PUBLIC. Is this true? Or, is it possible to programatically add a property(variable) to a custom object, initializing it as an array?
>
>Thank you!
>
>Michael Reynolds

Add your property as:

arrayname[1]

Then you can DIMENSION it to any size needed in code. You can also set it's dimension at the time the property is created if you know what it should be, or if it needs to be multi-dimensional. arrayname[5,10]
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform