AT_C()

_Dos, _Mac, _Unix, _Windows

These system variables tell you which platform FoxPro is running on. In Visual FoxPro for Windows, _WINDOWS is true and the rest are false. In VFP/Mac, _MAC is .T. If we ever see Visual FoxPro for the other platforms, we expect we'll see the matching system variables set true, but we're not holding our breath.

Usage

lIsDos = _DOS lIsMac = _MAC lIsUnix = _UNIX lIsWindows = _WINDOWS
Back when cross-platform meant more than Windows 95 and Windows NT, these variables were useful for cross-platform development. They allowed you to bracket platform-specific code so it didn't cause errors on the other platforms.

Example

DO CASE CASE _WINDOWS    MODIFY WINDOW screen FONT "Arial",10 CASE _MAC    HIDE WINDOW screen ENDCASE

See Also

OS()


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net