FIX: #IF and #ENDIF Behavior in FoxPro Differs from dBASELast reviewed: October 20, 1997Article ID: Q112834 |
2.60 | 2.60WINDOWS | 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:
#IF D=1 ? "TEST" #ENDIF MORE INFORMATIONThe following code demonstrates how #IFDEF works in dBASE and FoxPro:
*** #IFDEF Example *** #IFDEF d ? "TEST" #ENDIFThis 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |