Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Initializing Variable
Message
De
29/07/1998 10:00:25
 
 
À
29/07/1998 01:44:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00122209
Message ID:
00122285
Vues:
18
>If the variable doesn't exist at a higher level, than it defaults to PRIVATE. If it exists at a higher level, than that variable it is used.
>
>IMHO, it's better to explicitly declare all local variables as LOCAL.
>

So that was what was confusing me.

In the VFP documentation, PRIVATE pcVariable does not initialize pcVariable. It just makes pcVariable private to that method or procedure. I didn't realize that pcVariable=whatever automatically made pcVariable private.

So how long does a PRIVATE variable exist if it remains in existance after a method or procedure has completed. And how is that different from a PUBLIC variable?

Where would you use a PRIVATE variable?

Thanks for your help.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform