Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro Life
Message
De
22/04/2017 02:07:37
Walter Meester
HoogkarspelPays-Bas
 
 
À
21/04/2017 16:19:45
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrats & ententes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01649781
Message ID:
01650526
Vues:
62
>>>1 A macro isn't a memvar. The second you use the & you have a command. So no mdot is required. However, the second I use & I immediately add the trailing optional period, just as I add the trailing ) after using a (. This practice means any time I use macros within an object reference, I automatically get the .. correct.
>>
>>Which my eyes always perceive as a travesty, but does not alter the soundness of the practice ;-)
>>
>>>
>>>2 An array isn't a memvar. It's a collection of elements. m.laArray[1,2] makes no sense at all.
>>
>>Esp. as it will run a such-named program if no array of that name is in scope ;-))
>>
>>
>>>3 an object is stored in a memvar.
>>
>>>4 use mdot everywhere it will permit you, even in assignments, even and especially if you have a naming convention. Mdot is built into FoxPro for a reason. I trust the creators of the language far more than the Hungarian notation camp, and far more than the most vocal mdot naysayers.
>>
>>Disagree personally on the left side of assignments. Adds typing AND small, but unnecessary CPU load.
>
>That is well compensated for because in the debugger, hovering over any variable with the m. will show the variable content, not the field content.

You should NEVER have variables and fields named the same in the first place. Just one missing of mdot and you have a bug in your program.
Relying solely on mdot to avoid fieldname clashes is a rookie mistake. You put yourself at risk unncessarily.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform