Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flags for ASCAN command
Message
 
 
To
17/01/2005 17:22:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00977777
Message ID:
00978145
Views:
49
>>Yes, it offers the same design. But I was unable to make it work. I actually tried to use a constant from foxpro.h (AFIELDS_WIDTH) and the program complained, that there is no such variable. I had to put #include foxpro.h in the beginning of the program in order to make it work. I forgot, how can we have "GLOBAL" constants?
>
>I recommend *not* using foxpro.h as an include file. It's huge and has very poor and inconsistent naming conventions. It thus becomes very easy to have a #DEFINE wreak havoc with programs where you might have variables or fields with the same name. Rather, when you find specific constants that you need, migrate these to your own (short, carefully-constructed) include file.
>
>The only downside is you may have to verify the constants haven't changed when a 64-bit FoxPro comes out (as if...), but I doubt there's much potential for trouble there.
>
>-- Randy

Hi Randy,

If there a way to check, if specified constant is already defined? For instance, when my program was a separate program, it blowed on AFIELDS_WIDTH constant. Now I included it into the long utility file which includes foxpro.h in one of its functions. I had a separate define for this constant, but now it tells me, that the constant is defined.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform