PRB: "Mismatched Case Structure" with Multiplatform .SCX File

Last reviewed: June 27, 1995
Article ID: Q112450
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for Macintosh, version 2.5b

SYMPTOMS

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.

CAUSE

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.

STATUS

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.

MORE INFORMATION

Steps to Reproduce Behavior

  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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.