Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preprocesor bug
Message
From
21/05/2006 23:30:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/05/2006 23:23:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01123796
Message ID:
01123862
Views:
14
>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.

I am not sure how relevant the following is for the discussion, but note that whatever you #define need not be a valid expression. It is just text which is replaced before the actual compilation phase. In theory, this might be used to your advantage, sometimes - although it might also make the program quite confusing.

Here is an example:
#define mydef "this is

clear
? mydef a text"
The output shows This is a text
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform