Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preprocessor errors in VFP7
Message
 
To
08/08/2001 12:11:35
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00541077
Message ID:
00541345
Views:
16
>>I recompiled a project to VFP7 that was compiled in VFP6. I received the following error several times in several files:
>>
>>#IF VFP_VERSION >= 6
>>Error in line 261 of cglobalenvironment.reset (record 9): Preprocessor expression is invalid.
>>
>>
>>I have not changed anything except just recompiling in the new version. No paths have changed. I said to build all. Any ideas about what is causing this and how I can get my application to compile correctly in VFP7?
>
>Where is your #DEFINE?
>
>And, just a thought, why not use the VERSION function?
>
>#IF LEFT( VERSION(4), 2 ) $ "6."
> MESSAGEBOX('6')
>#ELSE
> MESSAGEBOX(VERSION(4))
>#ENDIF
>

The code is from the Mere Mortals Framework classes. The #DEFINE is in a header file that is being "INCLUDE(d) from another header file. I didn't make any changes and in VFP 6 it compiles just fine but in VFP 7 it gives these errors. The actual #DEFINE statement uses the VERSION function to calculate the current version being run by casting it to a numeric value.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform