summaryrefslogtreecommitdiff
path: root/static/unix-v10/man3/ierror.3
blob: e4c106b04231143658149eb32a0c75be7f59e1de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.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.