.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)perror.3f 6.2 (Berkeley) 6/7/85
.TH PERROR 3F "June 7, 1985"
perror, gerror, ierrno \- get system error messages
.B subroutine perror (string)
.B subroutine gerror (string)
.B character*(*) function gerror()
will write a message to fortran logical unit 0
appropriate to the last detected system error.
will be written preceding the standard error message.
returns the system error message in character variable
may be called either as a subroutine or as a function.
will 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.
.ie \nM /usr/ucb/lib/libU77.a
D. L. Wasley, \fIIntroduction to the f77 I/O Library\fR
can be no longer than 127 characters.
The length of the string returned by
is determined by the calling program.
UNIX system error codes are described in
The f77 I/O error codes and their meanings are:
101 ``illegal unit number''
102 ``formatted i/o not allowed''
103 ``unformatted i/o not allowed''
104 ``direct i/o not allowed''
105 ``sequential i/o not allowed''
106 ``can't backspace file''
107 ``off beginning of record''
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 ``invalid data for integer format term''
116 ``invalid data for logical format term''
117 ``'new' file exists''
118 ``can't find 'old' file''
119 ``opening too many files or unknown system error''
120 ``requires seek ability''
122 ``negative repeat count''
123 ``illegal operation for unit''
124 ``invalid data for d, e, f, or g format term''