Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preprocesor bug
Message
From
22/05/2006 09:23:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/05/2006 23:58:45
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:
01123916
Views:
14
>>>You're right... just recently I found some piece of my old FPD2.6 code, with
>>>
>>>#define _out fwrite(h, chr(9)+
>>>
>>>... _out "some string")
>>>
>>>And as Fabio points out, an empty string is also a string... so, how does one #Define an empty string (not a pair of quotes)?
>>
>>Well, in the case of the preprocessor, I guess the "empty string" would be a #define constantname followed by nothing, not even quotation marks. Although I can see no practical value for such a #define.
>
>I can. You #define an optional clause in a SQL or table related statement...
>
>#define WellMaybe NOT
>
>create cursor crs1 (fld1 c(10) WellMaybe NULL)
>
>If you want to allow nulls, just #define WellMaybe, and you're done.

Thanks; that makes sense. I had forgotten the "variable" nature of constants, but taking that into account, I am sure other examples can be found. For instance, for other variable (and optional) clauses.
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
Reply
Map
View

Click here to load this message in the networking platform