Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Constants and SYS(5) + SYS(2003)
Message
From
24/09/1999 12:54:35
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00267724
Message ID:
00268586
Views:
36
>>Chewing it over, I agree with your sentiments George. Compile time is compile time. I just tested #DEFINE k_FILE File('test.tmp') and it too evaluates at run time. I would expect a constant - and I don't think I'll start taking "advantage" of this behaviour, because, to me, it's counter intuitive, confusing, and they might "fix" it at some future date.
>
>Hi David,
>
>I agree totally.

What is confusing? It #defines in foxpro work just like they do in all of the other languages that use them (with the exception of case insensitivity). It is just compile time macro expansion. I would not worry about the behavior changing, it is standard now.

I just wish that the #ifdef, etc. worked in the header files and that parameter passing (eg. #define MAX(a,b) iif(a>b,a,b)) was supported.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform