Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A basic thought about LOCAL variables
Message
 
À
28/12/1999 23:15:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00309158
Message ID:
00309741
Vues:
34
>I know you know and you know I know. :) But when somebody with your weigth in VFP (no pun intended :)) says that undeclared variables are PRIVATE (even if you say that this applies only to newly created vars) many others may miss the subtlety and, as I've seen way too many times in practice, they will not declare variables as PRIVATE because... they are PRIVATE anyway. :(

Vlad,

So do propose that we say that variables created through assignment are NOT private? That is pure hogwash, they are private. The docs say so, it has always been that way. The issue of whether ones code stomps on itself or not is totally separate from the scope of the variable created.

I agree that it is a good programming practice to always declare new variables, as a matter of fact, I believe that anything but LOCAL declarations is suspect of bad design. However, that does not change the fact that variables are private by default in VFP.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform