Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ierrno(3F) — Sun WorkShop 5.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

perror(3)

PERROR(3F)

NAME

perror, gerror, ierrno − get system error messages

DESCRIPTION

perror — write a message to FORTRAN logical unit 0

The message is for the last detected system error. 
string is a character input argument. 
It is written preceding the standard error message.

Example 1: perror:

...
CALL perror ( "file is for formated I/O" )
...

gerror — return system error message

string is a character output argument. 

Example 2: gerror, used as a subroutine:

CHARACTER string∗30
...
CALL gerror ( string )
WRITE(∗,∗)  string
END

Example 3: gerror, used as a function; in this case, string is not used:

CHARACTER gerror∗30, z∗30
...
z = gerror( )
WRITE(∗,∗)  z
END

ierrno — return the error number of the last detected system error

This number is updated only when an error actually occurs.  Most routines and I/O statements that might generate such errors return an error code after the call; that value is a more reliable indicator of what caused the error condition.

Example 4: ierrno:

INTEGER  ierrno, n
...
n = ierrno ( )
WRITE(∗,∗)  n
END

FILES

libF77.a

SEE ALSO

intro(2), perror(3)

RESTRICTIONS

string in the call to perror cannot be longer than 127 characters. 

The length of the string returned by gerror is determined by the calling program. 

NOTES

If the error code is greater than or equal to 1000, it is a f77 I/O error. 

If the error code is less than 1000, it is a system error.  See intro(2). 

The f77 I/O error codes and their meanings are:

1000error in format
1001illegal unit number
1002formatted io not allowed
1003unformatted io not allowed
1004direct io not allowed
1005sequential io not allowed
1006can’t backspace file
1007off beginning of record
1008can’t stat file
1009no ∗ after repeat count
1010off end of record
1011<not used>
1012incomprehensible list input
1013out of free space
1014unit not connected
1015read unexpected character
1016illegal logical input field
1017’new’ file exists
1018can’t find ’old’ file
1019unknown system error
1020requires seek ability
1021illegal argument
1022negative repeat count
1023illegal operation for unit
1024<not used>
1025incompatible specifiers in open
1026illegal input for namelist
1027error in FILEOPT parameter

SunOS 5.0  —  Last change: 98/09/16

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026