strange behavior on end-of-record in READ

Jerry DeLisle jvdelisle2@gmail.com
Fri Oct 21 00:34:00 GMT 2011


On 10/19/2011 07:26 PM, Mark Rashid wrote:
>
> I understand that the Standard doesn't require that reading past the end
> of a record be treated as an error, but I was surprised by the
> difference in the way this circumstance is handled between formatted and
> unformatted reads.
>
Although its a curiosity to just print the value of iostat when you use this 
error/condition capturing mechanism, the idea of it is to "handle" it, in which 
case one would not normally just go do another read.  The idea is to avoid doing 
another read that results in, formally speaking, undefined values.  Its really 
up to the programmer to deal with these situations, not the compiler or the run 
time library.



More information about the Fortran mailing list