Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_Include problems
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00391672
Message ID:
00391917
Views:
10
>Now you've got me thinking about #IF. I know I can add a pre-defined value like .F., but I'm wondering if the same is true about functions. Or if you can only check for constants defined by #DEFINE:
>#DEFINE DEBUGMODE .T.
>
>#IF DEBUGMODE
>
>#ENDIF

Hi Larry,

According to the help you can use functions, but I would guess they have to pertain to what is available during compile-time. From the help:
#IF 'WINDOWS' $ UPPER(VERSION( ))
   ? 'This was compiled under Visual FoxPro for Windows'
#ELIF 'MAC' $ UPPER(VERSION( ))
   ? 'This was compiled under Visual FoxPro for Macintosh'
#ELIF 'UNIX' $ UPPER(VERSION( ))
   ? 'This was compiled under FoxPro for UNIX'
#ELSE 
   ? 'This was compiled under FoxPro for MS-DOS'
#ENDIF
#IFDEF however only works with DEFINEd constants.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform