ID: Q112450
The information in this article applies to:
If a screen is transported from one platform to any other platform, and a hard-coded procedure in a code snippet is written into the generated .SPR file before the Cleanup/Procedures code, a "Mismatched Case Structure" error message appears.
In a multiplatform environment, the .SPR file is generated with a CASE statement, with _WINDOWS and _MAC being one case, and _DOS and _UNIX being the other. The error message "Mismatched Case Structure" occurs when FoxPro encounters a hard-coded PROCEDURE command in the screen's Setup code that is within the first CASE statement. FoxPro assumes it has moved beyond the end of any iterative logic because it encountered the PROCEDURE command before the termination of the CASE statement by an ENDCASE statement.
This behavior is by design. All procedures and functions should be included in the Cleanup/Procedures code snippet of a screen and should not be included in any other snippet.
1. In FoxPro for Windows, create a screen with the following code in the
Setup code snippet:
PROCEDURE test
RETURN .t.
2. Save the screen.
3. Open the .SCX file in FoxPro for Macintosh to force the Macintosh
records to be written into the .SCX file.
4. Generate the .SPR file.
5. Run the .SPR file. The error should occur.
Additional reference words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b cross- platform multiple KBCategory: kbprg kbprb KBSubcategory: FxprgGeneral
Last Reviewed: June 27, 1995