Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compiler does not catch this syntax error, bug?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00901990
Message ID:
00902882
Vues:
22
Frank,

Unfortenately, there are too many situations that the parser can't control with a Macro substitution, personally I would not try to bother. For instance your code looked like a 100% winner for producing an error but it wasn't. But what if the parser insisted it was a 100% faillure, no thanks.

Yes, I realize the challenge.

And I think that all the others are correct, only use Macro substitution only when needed. A lot of times, there are better alternatives.


I must say that I do not abuse macro substitution. David suggested evaluate(), which works great in most cases. But it doesn't work in all cases, consider the following:
c = "copy file a.txt to c:\a.txt"
&c && works
evaluate(c) && you get syntax error
Thanks,

Dawa
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform