Sun Studio 12: Fortran Library Reference ierrno: Get Number for Last Detected System Error

The function is called by:

n = ierrno()

Return value 



Number of last detected system error 

This number is updated only when an error actually occurs. Most routines and I/O statements that might generate such errors return an error code after the call; that value is a more reliable indicator of what caused the error condition.

Example 4: ierrno():

       INTEGER*4 ierrno, n
       n = ierrno()
       write(*,*) n

See also intro(2) and perror(3).