|
This part of the guide contains detailed descriptions of the
BUSH built-in packages.
4.20 OS Package
The BUSH OS package contains miscellaneous operating system routines.
i := os.status
Return the the least operating system exit status. (To set the exit status,
use command_line.set_exit_status.)
Example: if os.status /= 0 then put_line( standard_error, "error!" ); end if;
Ada Equivalent: none (AdaScript extension)
Parameters:
|
s := os.strerror( i )
Return the operating system string error message for error number i.
Example: put_line( os.strerror( 15 ) );
Ada Equivalent: none (AdaScript extension)
Parameters:
| s |
result |
string |
required |
the error message (e.g. "Operation Not Permitted") |
| i |
in |
integer |
required |
the O/S error number (e.g. 1 ) |
|
os.system( s )
Run an operating system command in the default shell. This is the same as
the C system() function. Use os.status to determine the exit status.
Example: os.system( "ls" );
Ada Equivalent: none (AdaScript extension)
Parameters:
| s |
in |
string |
required |
the sound shell command to execute |
|
|