ID: Q119939
2.60 | 2.60 | 2.50b 2.50c
WINDOWS | MS-DOS | MACINTOSH
kbprg kbbuglist kbfixlist
The information in this article applies to:
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.
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.
1. In the Command window, type "CREATE SCREEN test" (without the
quotation marks).
2. In FoxPro for Windows or Macintosh, choose Layout from the Screen
menu.
In FoxPro for MS-DOS, choose Screen Layout from the Screen menu.
3. 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.
4. 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.
5. 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
6. From the File menu, choose Close. FoxPro returns to the Screen
Design window.
7. From the Program menu, choose Generate.
8. When prompted to save changes to the screen, choose Yes.
9. When prompted to save environment information, choose No.
10. In the Generate Screen dialog box, choose Generate.
11. Close the Screen Design window.
12. In the Command window, type "MODIFY COMMAND test.spr" (without the
quotation marks).
13. 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
Additional reference words: FoxMac FoxDos FoxWin 2.50b 2.50c 2.60 2.60a
buglist2.50b buglist2.50c buglist2.60 fixlist2.60a generator genscreen
screengen
KBCategory: kbprg kbfixlist kbbuglist
KBSubcategory: FxtoolSbuilder
Keywords : FxtoolSbuilder kbbuglist kbfixlist
Version : 2.60 | 2.60 | 2.50b 2.50c
Platform : MACINTOSH MS-DOS WINDOWS
Solution Type : kbfix
Last Reviewed: October 22, 1997