>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!