Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ perror(3F) — Sun FORTRAN 1.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

perror(3)

PERROR(3F)  —  FORTRAN LIBRARY ROUTINES

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 will be written preceding the standard error message. 

Example:

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

gerror — return system error message. 

string is a character output argument. 

Example: This may be used as a subroutine:

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

or 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:

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

FILES

libF77.a

SEE ALSO

intro(2), perror(3), “Introduction to the f77 I/O Library”

BUGS

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

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

NOTES

SunOS system error codes are described in intro(2). The f77 I/O error codes and their meanings are:

100“error in format”
101“illegal unit number”
102“formatted io not allowed”
103“unformatted io not allowed”
104“direct io not allowed”
105“sequential io not allowed”
106“can’t backspace file”
107“off beginning of record”
108“can’t stat file”
109“no ∗ after repeat count”
110“off end of record”
111“truncation failed”
112“incomprehensible list input”
113“out of free space”
114“unit not connected”
115“read unexpected character”
116“blank logical input field”
117“’new’ file exists”
118“can’t find ’old’ file”
119“unknown system error”
120“requires seek ability”
121“illegal argument”
122“negative repeat count”
123“illegal operation for unit”
124“too many files open - no free descriptors”
125“attempted operation on unit that’s not open”
126“illegal input for namelist”
127“error in FILEOPT parameter”

Sun Release 4.1  —  Last change: 31 July 1990

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