------- Comment #12 from martin at mpa-garching dot mpg dot de  2006-03-09 
07:12 -------
(In reply to comment #11)
> OK, after some discussion on comp.lang.fortran it is clear tha END and EOR are
> not error conditions.  They are there to allow for example, reading in a loop
> until the end of a file is reached and branching out.  A true error condition
> would be something like a disk failure and the like.
> 
> So, if an application is anticipating hitting the End-of-File deliberately 
> then
> use the END parameter.  Likewise for EOR.

I agree completely for the reading case. But if I have a file open for writing
and try to write 8 bytes into a 4-byte record, shouldn't we jump to the ERR=
label? Unfortunately there is no support for EOR= in WRITE statements.
This feels a bit like an inconsistency in the standard.

> The most portable method to handle things is to use IOSTAT and test for the
> conditions of interest.

Yes, I think I'll suggest this to the Starlink people.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26509

Reply via email to