Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#DEFINE - Why?
Message
De
31/03/2008 15:42:49
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
31/03/2008 11:41:36
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01306848
Message ID:
01307110
Vues:
10
Perhaps the advantage of #DEFINE is that you don't need to explain why you're storing a constant in something called a "variable".

FWIW, if you do use variables then you need to pay attention to the m. performance issues, especially if you're doing calculations inside tight loops. Without the m. prefix, VFP will have to check for a field of the same name in the selected table every time the variable is referenced, which does not happen with a #DEFINE.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform