[SparForte][Banner]
[Top Main Menu] Intro | Tutorials | Reference | Packages | Examples | Contributors   [Back Page]      [Next Page]  

OS Package

The SparForte OS package contains miscellaneous operating system routines.

  i := status
  s := strerror( i )
  system( s )
 
Help Command: Contents of the os package

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]

 Summary

 arrays

 btree_io

 calendar

 cgi

 chains

 command_line

 db/ postgresql

 dbm

 directory_operations

 doubly_linked...

 dynamic_hash_...

 enums

 exceptions

 files

 gnat.cgi

 gnat.crc32

 hash_io

 lock_files

 memcache

 memcache.highread

 mysql

 mysqlm

 numerics

 os

 pen

 pen (OpenGL)

 records

 sound

 source_info

 stats

 strings

 System

 teams

 templates

 text_io

 units

[Back to Top] Back To Top [Small Forte Symbol]