Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution
Message
From
27/12/2002 05:47:36
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00735756
Message ID:
00736003
Views:
25
>>Others have given solutions on how to write it without macro substitution. So, it's possible. But IMO macro substitution is a very legitimate technique.
>
>Yes it's legitimate technique in places where it cannot be done w/o macro substitution. Using macro substitution makes code slower, harder to read and maintain.

Sergey / Jos,

There are more than enough situations where speed isn't an issue at all, for example if it's not in a million times loop. Even in a SQL-query it's okay, as the substitution is done only once by vfp.

Harder to read? Which one is harder to read? I can't see an essential difference.
&lcString = &lcDir
STORE EVALUATE(lcDir) TO (lcString)
Maintenance issue? Tell me...

The core point is that AndersH may have (had) a feeling that macro substitution is not a proper programming technique. Statements about performance penalties have been abundant in the last decade and still have their impact on many programmers. I challenge those judgments and think that they're obsolete.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform