Revision 88d0a458d499c9e60b972448de42f2b9acf6453b authored by Ken Thompson on 06 November 1973, 00:41:35 UTC, committed by Ken Thompson on 06 November 1973, 00:41:35 UTC
Work on file man/man2/break.2 Work on file man/man2/chdir.2 Work on file man/man2/chmod.2 Work on file man/man2/chown.2 Work on file man/man2/close.2 Work on file man/man2/csw.2 Work on file man/man2/dup.2 Work on file man/man2/exit.2 Work on file man/man2/fork.2 Work on file man/man2/fstat.2 Work on file man/man2/getgid.2 Work on file man/man2/getuid.2 Work on file man/man2/indir.2 Work on file man/man2/kill.2 Work on file man/man2/link.2 Work on file man/man2/mount.2 Work on file man/man2/open.2 Work on file man/man2/pipe.2 Work on file man/man2/read.2 Work on file man/man2/seek.2 Work on file man/man2/sleep.2 Work on file man/man2/stat.2 Work on file man/man2/stime.2 Work on file man/man2/stty.2 Co-Authored-By: Dennis Ritchie <dmr@research.uucp> Synthesized-from: v4
1 parent 89372e2
ierror.3
.th IERROR III 10/29/73
.sh NAME
ierror \*- catch Fortran errors
.sh SYNOPSIS
.ft B
if ( ierror ( \fIerrno\fB ) .ne. 0 ) goto \fIlabel\fR
.sh DESCRIPTION
.it Ierror
provides a way of detecting errors during the running of a Fortran
program.
Its argument is a run-time error number
such as enumerated in
.it fc
(I).
.s3
When
.it ierror
is called,
it returns a 0 value; thus the
.bd goto
statement in the synopsis is not executed.
However, the routine stores inside itself the
call point and invocation level.
If and when the indicated error occurs,
a
.bd return
is simulated from
.it ierror
with a non-zero value;
thus the
.bd goto
(or other statement)
is executed.
It is a ghastly error to call
.it ierror
from a subroutine which
has already returned when the error occurs.
.s3
This routine is essentially tailored to
catching end-of-file situations.
Typically it is called just before the start
of the loop which reads the input file,
and the
.bd goto
jumps to a graceful termination of the program.
.s3
There is a limit of 5 on the number
of different error numbers which can be caught.
.sh "SEE ALSO"
fc (I)
.sh BUGS
There is no way to ignore errors.
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...