.TH errno "" "" "Global Variable"
.PC "External integer for return of error status"
.B "#include <errno.h>"
.B "extern int errno;"
.PP
.B errno
is an external integer that \*(CO links into each of its programs.
\*(CO sets
.B errno
to the negative value of any error status returned to any function
that performs \*(CO system calls.
.PP
Mathematical functions use
.B errno
to indicate classifications of errors on return.
\fBerrno\fR is defined within the header file \fBerrno.h\fR.
Because not every function uses
.BR errno ,
it should be polled only in connection with those
functions that document its use and the
meaning of the various status values.
For the names of the error codes (as defined in
\fBerrno.h\fR, their value, and the message returned by the function
\fBperror\fR, see
.BR errno.h .
.SH Example
For an example of using \fBerrno\fR in a mathematics program,
see the entry for \fBacos\fR.
.SH "See Also"
.Xr "errno.h," errno.h
.Xr "libm," libm
.Xr "perror()," perror
.Xr "Programming COHERENT," programmi
.Xr "signal()" signal
.br
\*(AS, \(sc7.1.4
.br
\*(PX Standard, \(sc2.4
