File:  [Research Unix] / researchv10dc / dist / man / v4 / man3 / ierror.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.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.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.