PRB: PROGRAM(0) and PROGRAM(1) Return Different Results

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

SYMPTOMS

Depending on how a program is executed, PROGRAM(0) and PROGRAM(1) may not return the expected results. For example, when a program is executed from the Run menu, the return values will be "ON..." instead of the executing program name.

RESOLUTION

If you are using these functions to obtain the main program name, remove FOXSTART.APP from the FoxPro folder. Doing this keeps the Run menu from appearing when FoxPro is restarted and thus removes the ability to choose Application from the Run menu in order to start a program.

MORE INFORMATION

The functions PROGRAM(0) and PROGRAM(1) return the name of the master program (the highest-level program).

Steps to Reproduce Behavior

  1. Create a program file and include the following:

          WAIT WINDOW PROGRAM(0)
          WAIT WINDOW PROGRAM(1)
    

  2. From the Program menu, choose Do, and select the above program. PROGRAM(0) and PROGRAM(1) return the currently executing program.

  3. From the Run menu, choose Application, and select the above program. PROGRAM(0) and PROGRAM(1) both return "ON..." instead of the program name.


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