END TRANSACTION

Fox, FoxPro

Two variables that don't exist until you declare them, and then they're immediately .T., these were added in an era when generic Xbase code could bracket functions that should run only under the Fox languages.

Usage

PUBLIC FOX | FOXPRO lRunningWithTheFox = FOX | FOXPRO

Parameter

Value

Meaning

lRunningWithTheFox

.T.

When you're running in a Fox product, FOXPRO is true in FoxPro 1.x or later, while FOX is true in FoxBase and later.

.F.

Running under some other language.


In days long past, it wasn't unusual for a developer to write an application in his favorite development environment, run the code for testing in another, and compile the code into a compact little EXE for distribution with a third product. In that case, the code would need to be able to detect which language it was running in before it tried to use any language-specific code. These two variables were the means of detecting the Fox Software FoxBase and FoxPro products.

Normally, declaring variables public initializes them as .F. These two are the exception.

Example

RELEASE FOXPRO PUBLIC FOXPRO IF FOXPRO   * do it right ENDIF

See Also

_DOS, _MAC, _UNIX, _WINDOWS


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