Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text box tooltip
Message
De
14/01/2005 09:07:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
14/01/2005 07:43:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows '98
Database:
Visual FoxPro
Divers
Thread ID:
00977082
Message ID:
00977175
Vues:
28
>One tiny thing however. I don't agree with Fabio about the use of 'm.this.Value'. It should be 'this.value', so without the mdot. The mdot is complicating things here and does not add quality to the code. Fabio, you are giving a bad example and the risk is that it may become widespread to even specify the mdot when refering to this, thisform and the like. I know you can prove that 'this' could also be the name of a field, but that's really too academic.

In view of some recent discussions about speed, I did some speed tests, both with ThisForm... and with m.ThisForm... the theory being that VFP might search for a fieldname first, if the m. is omitted.

When trying to actually access a field named "This", it seems that VFP indeed finds the fieldname. So, it seems that Fabio is right, in principle.

On the other hand, with a cursor having 10 fields, I found no significant speed difference in a tight loop. And that is about the only issue that would worry me, since I don't plan calling a field "This" or "ThisForm".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform