Microsoft KB Archive/124128

{| = PRB: Error: MS-DOS & Windows Setup Code Different Parameters =
 * width="100%"|

ID: Q124128

2.50x 2.60 2.60a | 2.50x 2.60 2.60a | 2.50x 2.60 2.60a | 2.6

WINDOWS         | MS-DOS           | MACINTOSH        | UNIX kbprb The information in this article applies to:
 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a
 * Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a
 * Microsoft FoxPro for Macintosh, version 2.5b, 2.5c, 2.6, 2.6a
 * Microsoft FoxPro for UNIX, version 2.6

SYMPTOMS

After transporting a screen to a different platform, the following error may occur when attempting to generate the screen:

MS-DOS and Windows setup code have different parameters The screen is not generated.

CAUSE
The setup code in one or more platforms specifies a different number of variables on the parameter statement from that of the setup code in the current platform.

GENSCRN.PRG uses the screen file (.SCX) as a database and attempts to do a text merge into one large program, with DO CASE constructs for each platform. This large program can contain only one parameter statement at the beginning of the file, regardless of how many platforms are present in the screen file (.SCX).

GENSCRN.PRG looks at the setup code on each platform for a parameter statement. When the number of variables specified in this statement differ from one platform to another, GENSCRN.PRG is unsure of which parameter statement should take precedence and displays the error message.

WORKAROUNDS
There are two possible resolutions to eliminate the error:

 Edit the parameter statements so that the setup code for each platform contains the same number of parameters. -or- If you must pass different numbers of parameters for each platform, choose the " Objects Only" push button when generating the code for each platform. This will prevent the error from occurring because only one possible parameter statement will be included in the generated program (.SPR).

STATUS
This behavior is by design.

Steps to Reproduce Behavior
1. Create a screen file using FoxPro on any platform. In the setup

code of the screen, add the following lines of code:

#SECTION 1 * The following line must start at the left margin with no spaces * or tabs preceding the word parameter. PARAMETER x, y, z 2. Save the file. Transport it to any other platform. 3. Edit the screen file and change the code as follows:

#SECTION 1 * The following line must start at the left margin with no spaces * or tabs preceding the word parameter. PARAMETER x, y 4. Attempt to generate the screen. An error will occur and the screen program will not be generated. Additional reference words: FoxWin FoxDos FoxMac FoxUnix 2.50 2.50a 2.50b 2.50c 2.60 2.60a errmsg err msg message KBCategory: kbprb KBSubcategory: FxtoolSbuilder Keywords         : kberrmsg FxtoolSbuilder Version          : 2.50x 2.60 2.60a | 2.50x 2.60 2. Platform         : MACINTOSH MS-DOS UNIX WINDOWS
 * }