Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preprocesor bug
Message
De
21/05/2006 23:23:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
21/05/2006 13:49:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01123796
Message ID:
01123861
Vues:
21
>>>Run this example:
>>>
>>>#define INP
>>>#define REF
>>>#define OUT
>>>
>>>? INP REF OUT && Variable 'REF' is not found.
>>>? INP REF     && Variable 'REF' is not found.
>>>? INP
>>>
>>>? INP OUT REF && Variable 'OUT' is not found.
>>>? INP OUT     && Variable 'OUT' is not found.
>>>
>>>
>>>
>>>Why preprocesor ignoring each second constant at compiling?
>>
>>Better question: why didn't it catch that your #define statements are bad? The expressions are missing. Yet it compiles without a hitch.
>>
>An empty is not a bad #define.
>A string preprocessor has to allow to define empty strings.

The syntax is "#define pseudovariable expression" - so the expression is not an optional clause. The expression may evaluate to an empty string:

#define out ""

would be proper syntax, and the pseudovariable "out" would evaluate to empty string. In Martin's case, I think the preprocessor should report something like "missing expression" instead of compiling OK and having mysterious output later.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform