2.60 | 2.60 | 2.50b 2.50c
WINDOWS | MS-DOS | MACINTOSH
kbprg kbbuglist kbfixlist
The information in this article applies to:
- Microsoft FoxPro for Windows, version 2.6
- Microsoft FoxPro for MS-DOS, version 2.6
- Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c
SYMPTOMS
The Screen Builder program (GENSCRN.PRG) doesn't recognize #ELIF and #UNDEF
as preprocessor directives. The .SPR program file generated for a screen
that has code snippets containing these directives isn't correct.
NOTE: This problem does NOT occur in prior versions of FoxPro for Windows
or MS-DOS.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. This problem was corrected in
FoxPro version 2.6a for Windows, FoxPro version 2.6a for MS-DOS, and FoxPro
version 2.6a for Macintosh.
MORE INFORMATION
Steps to Reproduce Problem
- In the Command window, type "CREATE SCREEN test" (without the
quotation marks).
- In FoxPro for Windows or Macintosh, choose Layout from the Screen
menu.
In FoxPro for MS-DOS, choose Screen Layout from the Screen menu.
- In FoxPro for Windows or Macintosh, in the Screen Layout dialog
box, under Options, choose the Code button.
In FoxPro for MS-DOS, under Screen Code, select the Setup
check box, and then choose OK. Skip to step 5.
- In FoxPro for Windows or Macintosh, in the Screen Code dialog
box, choose Screen Setup Code. Choose OK twice.
NOTE: This step doesn't apply to FoxPro for MS-DOS.
- Type the following code in the Setup Code snippet window:
#IF 'WINDOWS' $ UPPER(VERSION())
? 'This is FoxPro for Windows'
#ELIF 'MAC' $ UPPER(VERSION())
? 'This is FoxPro for Macintosh'
#ELIF 'UNIX' $ UPPER(VERSION())
? 'This is FoxPro for UNIX'
#ELSE
? 'This is FoxPro for MS-DOS'
#ENDIF
#DEFINE testconst 10
#UNDEF testconst
- From the File menu, choose Close. FoxPro returns to the Screen
Design window.
- From the Program menu, choose Generate.
- When prompted to save changes to the screen, choose Yes.
- When prompted to save environment information, choose No.
- In the Generate Screen dialog box, choose Generate.
- Close the Screen Design window.
- In the Command window, type "MODIFY COMMAND test.spr" (without the
quotation marks).
- Go to the "Setup Code" section.
In the code that follows, note that the #ELIF statements and the
#UNDEF statement are missing:
#REGION 1
#IF 'WINDOWS' $ UPPER(VERSION())
? 'This is FoxPro for Windows'
? 'This is FoxPro for Macintosh'
? 'This is FoxPro for UNIX'
#ELSE
? 'This is FoxPro for MS-DOS'
#ENDIF
#DEFINE testconst 10
|