Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calvin Hsia's blog and VFP tools
Message
 
À
19/12/2004 11:59:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00969652
Message ID:
00970499
Vues:
26
>an optimal thing would be a new SET os SYS()
>that force VFP to does not search a variable without m. prefixe declared.
>SET MEMVARPREFIXNEED [ON|OFF] && defaul OFF
>* or
>SYS(someNumber,0|1) && default 0


Fabio,

For your information, in Clipper 5, the following keywords are handy and can be considered by the VFP team:

MEMVAR ListOfVariableNames
FIELD ListOfFieldNames [IN Alias]

Unaliased references to the names specified by MEMVAR will be assumed to be variables. Similarly, unaliased names specified by FIELD will be assumed to be fields.

In the old days when I was programming in Clipper Summer 87 and FoxBase, I (and most programmers at that time, I think) prefixed all variables with "m" (e.g. mStackLevel), since typing "M->" (equivalent to our "m.") is tedious. The new keyword MEMVAR in Clipper 5 did really make me happy since when we are writing library functions, most of the time we are dealing with only variables.

In FoxPro for DOS, I changed mStackLevel to m.stackLevel in order to save one precious character (only the first 10 characters of a variable name are significant in FPD). I kept such practice until I upgraded to VFP7. The new syntax colouring feature of VFP7 annoyed me because it highlights quite number of my variables in keyword colour. I started to prefix my variables with a data type identifier, e.g., m.nStackLevel.


Ben
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform