Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible VFP7/8 ER: Integrate Crystal Reports
Message
De
17/04/2001 21:16:30
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
À
17/04/2001 17:30:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00495582
Message ID:
00496493
Vues:
13
>>I think we're confusing "pre-processing" and "compiling"; these are simply "code substitutions" performed during the pre-processor stage. The substituted code (ie. .... SYS( n ) ....) is what is getting compiled.
>
>Here's another good example for this:
>
>#DEFINE ccMESSAGE0 "Hello Mike!"
>#DEFINE ccMESSAGE1 Hello Mike!
>#DEFINE ccMESSAGE2 UPPER('Hello Mike!')
>#DEFINE ccMESSAGE3 ('Hello Mike!')
>?ccMESSAGE0
>?[ccMESSAGE1]
>?ccMESSAGE2
>?UPPER ccMESSAGE3


Yes, and for what it's worth, it's frequently more "efficient" to use a "variable" instead of a "constant"; eg.

m.cGreeting = "Hello Mike !"

#DEFINE C_GREETING "Hello Mike !"

If, for example, a program referenced "Hello Mike !" 10 times, using m.cGreeting is more "efficient" than referencing C_GREETING because using C_GREETING will add "10" occurances of the literal "Hello Mike !" to the "literal pool" vs "one" using the variable; ie. the code for the "variable case" is more compact.

"Literal pool" optimization is usally found in many native compilers, but not in VFP.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform