Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A basic thought about LOCAL variables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00309158
Message ID:
00309739
Vues:
29
Fred,

Ed and I are saying exactly the same thing. We are noth saying that a private variable is a private variable. There is no difference between a private variable that has been declared as such and one that hasn't.

The premise of the statement that I am arguing with is that;

PRIVATE lcVar
lcVar = 1

and

lcVar = 1

somehow makes lcVar different. It does not. lcVar is the saem in either case. If lcVar existed before the above code, then PRIVATE lcVar would hide that one (the one that existed it does absolutely nothing to the one you are about to create) and the second example does not hide an existing memvar but rahter uses it if it is in scope.

If I create, note I said create not assign a value, a new variable in VFP through the act of assigning a value. The memvar created is private in scope. This private memvar is no differetn than any otehr private memvar. The private declaration does not create a variable at all, it hides variables that may already exist.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform