Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preprocesor bug
Message
From
21/05/2006 23:23:32
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
21/05/2006 13:49:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01123796
Message ID:
01123861
Views:
22
>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform