Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check variables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00930854
Message ID:
00931562
Vues:
31
George,

The PUBLIC and LOCAL statements declare variables and initialize them to .F.
The PRIVATE statement doesn't declare a variable at all but hides any variables with the same name if they exist up to the caling chain. The following code demonstrates that
PRIVATE lcVar
? lcVar     && Error: Variable not found
LOCAL lcVar
? lcVar     && No Error>
>
>By default any variables declared as PRIVATE or LOCAL are initialized to .F.
>
>What I do is to add the variables to a LOCAL statement as I first access or assign them.
>
>This is really a problem with testing. If you properly test the code, then these issues go away.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform