SYS(31) Returns Error Code from RUN Command

Last reviewed: August 28, 1995
Article ID: Q120593
The information in this article applies to:
  • Microsoft FoxPro for UNIX, version 2.6

SUMMARY

In FoxPro for UNIX, the SYS(31) function returns the error code produced by a RUN command if the RUN command failed and a 0 if the RUN command was successful.

MORE INFORMATION

In the Command window, type the following:

   RUN xxx
   ?SYS(31)

Since the RUN command failed, SYS(31) returns a "1".

In the Command window, type the following:

   RUN ls
   ?SYS(31)

Since the RUN command was successful, SYS(31) returns a "0".

NOTE: An exclamation point (!) can be substituted for the keyword "RUN".

REFERENCES

FoxPro for UNIX online Help


Additional reference words: FoxUnix 2.60 sys return exit code run
KBCategory: kbprg
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: August 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.