OS Package
The SparForte OS package contains miscellaneous operating system routines.
i := os.status
|
Return the the least operating system exit status. |
Example |
if os.status /= 0 then put_line( standard_error, "error!" ); end if; |
Parameters |
Param |
Mode |
Type |
Default |
Description |
i |
return value |
integer |
required |
the O/S error number |
|
Exceptions |
- |
See Also |
command_line.set_exit_status |
Compare With |
- |
s := os.strerror( i )
|
Return the operating system string error message for error number i. |
Example |
put_line( os.strerror( 15 ) ); |
Parameters |
Param |
Mode |
Type |
Default |
Description |
s |
return value |
string |
required |
the error message (e.g. "Operation Not Permitted") |
i |
in |
integer |
required |
the O/S error number (e.g. 1 ) |
|
Exceptions |
- |
See Also |
- |
Compare With |
- |
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" ); |
Parameters |
Param |
Mode |
Type |
Default |
Description |
s |
in |
universal_string |
required |
shell command string |
|
Exceptions |
- |
Restrictions |
an exception will be raised in a restricted shell |
See Also |
- |
Compare With |
PHP: system |
|
![[Right Submenu]](art/right_menu_top.png)
|