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


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .