Microsoft KB Archive/120593

{| = SYS(31) Returns Error Code from RUN Command =
 * width="100%"|

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".