Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ierror(III) — UNIX 6th Edition 1.3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fc (I)

IERROR(III)  −  PWB/UNIX 10/29/73

NAME

ierror − catch Fortran errors

SYNOPSIS

if ( ierror ( errno ) .ne. 0 ) goto label

DESCRIPTION

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 fc (I).  When ierror is called, it returns a 0 value; thus the 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 return is simulated from ierror with a non-zero value; thus the goto (or other statement) is executed.  It is a ghastly error to call ierror from a subroutine which has already returned when the error occurs.  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 goto jumps to a graceful termination of the program.  There is a limit of 5 on the number of different error numbers which can be caught.

SEE ALSO

fc (I)

BUGS

There is no way to ignore errors. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026