Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LOCAL Variables finder
Message
De
02/12/2004 09:04:42
 
 
À
02/12/2004 06:34:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Divers
Thread ID:
00966289
Message ID:
00966360
Vues:
9
>Hi Marvin.
>
>Have you ever looked for an Intelliscript which helps you find those undeclared local Variables.... here is one.
>
>Actually, no - because it is quite unnecessary. You do not need an IntelliSense script to do this. All you need to do is to set _VFP.LanguageOptions = 1. This means that strict type declaration is required for memory variables.
>
>When LanguageOptions is set to 1, you must declare all memory variables and arrays as LOCAL or PUBLIC prior to using them. An attempt to use an undeclared variable or array will generate output to the DEBUG OUTPUT window.
>
>Check out LanguageOptions in the on-line help.

You can use LanguageOptions=1 only if you don't use PRIVATE,
otherwise I see some little problems:
_vfp.LanguageOptions=1
PUBLIC rr2
DEBUGOUT "LanguageOptions see PUBLIC RR2"
testOptions()
RELEASE rr2
DEBUGOUT "LanguageOptions fire the warning"
testOptions()

PROCEDURE testOptions
PRIVATE rr2
RR2=4	&& THIS IS NOT PUBLIC RR2 
a correct implementation would have controlled the variable ones declared,
not the variable ones with a value only.

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform