Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can an array available in all procedures like a variable
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00363356
Message ID:
00363367
Vues:
15
I would use a__gen10[1,2]. I don't know if it makes a difference as a property, but in general using the () can confuse VFP because it thinks it's a function. But, yes, just use that as the name of the form property. Then it's visible anywhere in your form, just like any form property.

One problem you may run into is that I don't know if it will like redimensioning the array if it's a form property. You'll have to try it to see because I've never tried it.

You don't need to declare its scope if it's a property, but if you decide to go the variable route, you should. If you only need the array in the _same method_ as it's defined, you can make it LOCAL. If you need it in the whole form, I think you have to make it PUBLIC. (Remember to RELEASE it). I haven't had any luck with PRIVATE variables in forms unless it's defined in a program that calls the form.

Hope that makes sense. :)

Michelle


>so under form new property would I just type in a__gen10(1,2) and it should dimension size correctly? Would I want to declare the array private or local if I want to use the array in same form? Thanks for answering back
>
>
>Nick Patel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform