Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a Y2K problem?
Message
De
03/01/2000 11:56:15
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
03/01/2000 11:51:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00311693
Message ID:
00311729
Vues:
19
>Yep. It's called misuse of macro-expansion. Macro-expansion is neither needed nor desirable where you are simply using it to expand a name - you're giving VFP's interpreter the opprtunity to miscue early and often. Instead of using the macro-expansion operation, use name resolution by encapsulating theings that are names within parentheses - VFP can't misparse the name this way due to embedded delimiters, and it's faster and more reliable as well.
>
>Jim Booth's thread on the 10 most misused VFP constructs was right on the money - misuse of macro expansion is one of the worst culprits, and results in more head-scratching than almost any other part of the language, because programmers make poor assumptions about what;'s actually happening when macro-expansion takes place. If you need to get the command line parser involved in runtime interpretation of the command as a whole, then macro-expansion may be warranted; using it to replace a name at runtime means you've taken the lazy approach to handling the problem without regard for what is needed or desirable.
>

I hope you didn't mean these comments to be as condescending as they sound. I'm netiher lazy nor a poor programmer. I may not have understood the differences between name expression and macro-expansion as well as you, but I thank you for clarifying the problem.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform