Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field overlaping local variable - Bug or not ?
Message
De
05/06/2003 11:37:57
 
 
À
05/06/2003 09:58:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00796540
Message ID:
00796766
Vues:
20
I think that this is a prime example of why you should always use M. to prefix variables (whenever possible ie. except macro expansion) especially if you may have fields with the same name. IMHO, It not only makes code more readable, but effectively eliminates ambiguity and difficult to diagnose errant behaviour and may actually speed up code as VFP doesn't have to even look at fields in the current workarea. (not trying to start another to m. or not to m. flame war ;<)

I guess an alternative would be to change the default behaviour of VFP to always look at variables and force prefixing fields with the alias name which would cause a lot of broken legacy applications. I think that most would agree that this would be a real PITA when there is already an effective way to deal this.

Sorry Jim, this was supposed to be addressed to Srdjan, but I just hit a reply to your post.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform