Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scoping
Message
 
 
À
22/05/2007 06:58:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01227514
Message ID:
01227576
Vues:
26
>>>What level of scoping do I set a variable to in a procedure within a PRG so that it is available throughout the program? Do I have to define them at the program level before any procedures that contain them are called? Hate using PUBLIC if I don't have to.
>>
>>If you set the variable private it would be visible down in the calling chain.
>
>Actually, that's not correct - as long as a variable isn't LOCAL it will be 'visible' to any called modules.
>
>The purpose of PRIVATE is to hide any *previous* instance of the same variable name, beginning at where the PRIVATE is declared and continuing through any called module. A PRIVATE declaration does not cause the creation of any memory variable.

I'm not seeing contradiction to what I said. At least that's what I meant in my reply.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform