iostat
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Aug 22 20:35:00 GMT 2006
On Tue, Aug 22, 2006 at 10:07:10PM +0200, Daniel Franke wrote:
>
> If I am not completely mistaken, the numbers returned in "ierr"
> should be distinguishable?
>
Yes, you are mistaken. Section 9.4.1.4i states
Execution of an input/output statement containing the IOSTAT= specifier
causes the variable specified in the IOSTAT= specifier to become defined
(1) With a zero value if neither an error condition, an end-of-file
condition, nor an end-of-record condition occurs,
(2) With a processor-dependent positive integer value if an error
condition occurs,
(3) With a processor-dependent negative integer value if an
end-of-file condition occurs and no error condition occurs, or
(4) With a processor-dependent negative integer value different
from the end-of-file value if an end-of-record condition occurs
and no error condition or end-of-file condition
You have case (2). Note, it does not say that unique positive integers
must be assigned for different error conditions.
--
Steve
More information about the Fortran
mailing list