subroutine errio (stdout,subnam,mess,ios) c c======================================================================= c === c This routines determines the error status from the given iostat === c value. === c === c ------ === c Input: === c ------ === c === c STDOUT Unit number for standard output. (integer) === c SUBNAM Name of calling subroutine/function. (string) === c MESS Error message to print. (string) === c IOS IOSTAT value to test. (integer) === c === c Calls: EXITUS === c === c======================================================================= c c----------------------------------------------------------------------- c Define local data. c----------------------------------------------------------------------- c integer ios,stdout character*(*) mess,subnam c c======================================================================= c Begin executable code. c======================================================================= c if (ios .gt. 0) write (stdout,10) subnam,'error',mess,ios if (ios .lt. 0) write (stdout,10) subnam,'end-of-file',mess,ios c if (ios .ne. 0) call exitus (subnam) c return c 10 format (/'***Error: ',a,' - ',a,' occured while ',a/11x, & 'error code = ',i10) c end