Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A neat little 'gotcha' in VFP
Message
De
30/06/2006 08:23:37
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
29/06/2006 08:46:33
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01132511
Message ID:
01133032
Vues:
31
>When I began programming with FoxBase it was standard practice to refer to fields as tablename->fieldname and to just refer to variables as varname. When FoxPro came out the mdot notation for vars became standard and I think I missed a basic shift in philosophy. In any case, I still prefer to reference fields by table and that is what led to this problem. Jim, you are right that such a basic thing should be given more prominence in the help files. My coworkers cannot believe that the little test code gives the result that it does. They come from VB,C,and Delphi backgrounds where fields are almost never accessed directly. To them this VFP behavior is really really weird.

I'd do what is correct based on the documented behavior of the specific language. In C they do not access tables directly so there was no need of a way to distinguish memvars from fields. In Fox fields take precendence, so add the m. no matter how it looks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform