Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitution
Message
De
27/12/2002 17:18:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00735756
Message ID:
00736197
Vues:
24
>Peter,
>
>>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.
>
>In SQL-query it's okey because VFP doesn't offer any other way to build and execute dynamic queries.
>
>>Harder to read? Which one is harder to read? I can't see an essential difference.
>>
>>&lcString = &lcDir
>>STORE EVALUATE(lcDir) TO (lcString)
>>

>
>The first line (with macro substitution) imposible to decode w/o knowing values of both variables because variables in macro substitution can include any valid code.
>The second line (w/o macro substitution) is clear, value of 'lcDir' expression is stored into variable/property represented by 'lcString' value.

Hi Sergey,
What do you mean with 'decode' here?

>>Maintenance issue? Tell me...
>
>If you've something to say, say it. I supported enough code written by other programmers with unnecessary macro substitution to know what a nightmare it is.

No really, I'm interested in examples. Sure, I have my standpoint, but I'm eager to learn of examples that partly or wholy falsify my standpoint.

>>
>>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.
>
>My point is, that there is no reason to use macro substitution if code can be written w/o it.
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform