PRB: FB+Migration Application Not Correctly Converting ALERT

Last reviewed: May 16, 1996
Article ID: Q110367
The information in this article applies to:
  • Microsoft FoxPro for Macintosh, version 2.5b

SYMPTOMS

When you are using the FB+Migration application code analyzer, any lines that contain multiple prompts for the FoxBASE+ for the Macintosh ALERT command may be converted incorrectly.

RESOLUTION

Replace the commas used to separate each of the message parameters with plus signs (+).

For example, the code generated by the "More Information" steps below should like this:

   choice = _alert("CAUTION", 10, "Alpha"+CHR(13)+"Beta"+;
      CHR(13)+"Gamma"+CHR(13))

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a FoxBASE+/Mac program that contains the following line of code:

          ALERT CAUTION 10 TO choice "Alpha"+CHR(13), ;
    
               "Beta"+CHR(13), "Gamma"+CHR(13)
    
    

  2. Execute the FB+Migrate.app application in FoxPro for Macintosh.

  3. Choose Analyze Code and select the program created above.

  4. Choose Replace to replace the above line of code with its FoxPro equivalent and export the program.

The following line of code will be generated:

   choice = _alert("CAUTION", 10, "Alpha"+CHR(13), "Beta"+;
      CHR(13), "Gamma"+CHR(13))

When executed, the above code will generate a "Wrong number of parameters" error message.


Additional reference words: FoxMac 2.50b
KBCategory: kbprg kbprb
KBSubcategory:


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: May 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.