FIX: #IF and #ENDIF Behavior in FoxPro Differs from dBASEID: Q112834
WINDOWS | MS-DOS
kbprg kbbuglist kbfixlist
The information in this article applies to:
SYMPTOMS#IFDEF works differently in dBASE and FoxPro. FoxPro cannot use #IFDEF and #IFNDEF. Instead, FoxPro uses #IF, which takes only a logical value or a number (0 = false, 1 = true).
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in FoxPro 2.6a for Windows and MS-DOS.
RESOLUTIONTo work around this problem, issue an #IF statement instead. For example:
MORE INFORMATIONThe following code demonstrates how #IFDEF works in dBASE and FoxPro:
This code works properly in dBASE and does not print "TEST". However, in
FoxPro, "TEST" is printed. This means that any dBASE code that uses #IFDEF
will produce unexpected results when executed in FoxPro.
Additional reference words: FoxDos FoxWin 2.60 buglist2.60 fixlist2.60a KBCategory: kbprg kbbuglist kbfixlist KBSubcategory: FxprgGeneral Solution Type : kbfix |
|
Last Reviewed: October 20, 1997 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |