BUG: #IF <System Memvar> Returns "Invalid Preprocessor..."ID: Q115953 2.50 2.50a 2.50b 2.60 | 2.50 2.50a 2.50b 2.60 | 2.50b 2.50c
The information in this article applies to:
SYMPTOMSThe compiler directives #IF ... #ENDIF used with the _DOS, _WINDOWS, _MAC, and _UNIX system memory variables generate an "Invalid preprocessor expression" error message when compiled under FoxPro for Windows and FoxPro for Macintosh. FoxPro for MS-DOS does not produce any error messages when the same code is compiled. Instead, it compiles the statement following #IF _DOS and displays "This displays only when running under DOS".
RESOLUTIONTo obtain the desired results when using preprocessor directives, run the following code in all three products:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONBoth FoxPro for Windows and Macintosh return the expected results because the _DOS, _WINDOWS, _MAC, and _UNIX system memory variables are not considered preprocessor definitions since they are evaluated at run time, not compile time. The online help system for FoxPro for Windows, MS-DOS, and Macintosh contains the following warning: NOTE: Do not use system memory variables for <expN1> or <expL1>. System memory variables are not evaluated until run time.
Steps to Reproduce Problem1. Load FoxPro for Windows and run the following program:
2. Issue the MODIFY FILE <filename.ERR> command. Note that there are three
3. Load FoxPro for MS-DOS and run the same program. Make sure that the .FXP
FoxPro for MS-DOS will display the following message:
Additional reference words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b 2.60
2.50c
buglist2.50
buglist2.50a buglist2.50b buglist2.60 buglist2.50c memvar
KBCategory:
KBSubcategory: FxenvMemory
|
|
Last Reviewed: May 22, 1998 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |