Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!sei.cmu.edu!firth
From: firth@sei.cmu.edu (Robert Firth)
Newsgroups: comp.lang.fortran
Subject: Re: end= with no input variables ?
Message-ID: <511@aw.sei.cmu.edu.sei.cmu.edu>
Date: Wed, 7-Jan-87 09:36:46 EST
Article-I.D.: aw.511
Posted: Wed Jan  7 09:36:46 1987
Date-Received: Wed, 7-Jan-87 21:52:33 EST
References: <44400008@hcx1> <11040@sun.uucp>
Sender: netnews@sei.cmu.edu
Reply-To: firth@bd.sei.cmu.edu.UUCP (PUT YOUR NAME HERE)
Organization: Carnegie-Mellon University, SEI, Pgh, Pa
Lines: 34

In article <11040@sun.uucp> steved@sun.UUCP (Steve Dever) writes:
>In article <44400008@hcx1> daver@hcx1.UUCP writes:
>>
>>Suppose the following statement is used to read from an empty file:
>>
>   . . . 
>>             read (11, '(i5)', end=10)
>>
>>Should the end= branch be taken or not (using the same empty file) ?
>>I know of 2 compilers which do not take the branch.  Another one does.
>>
>
>At least 1 record is always read or written by a formatted I/O statement
>so the end= branch should be taken since the end-file record was read.
>This is specified in section 12.9.5.2 of the FORTRAN standard:
>
>    During formatted data transfer, data are transferred with editing between
>    the entities specified by the input/output list and the file.  The
>    current record and possibley additional records are read or written.
>
>
>-- 
>---------------------------
>Steve Dever          steved@Sun.COM
>                          or
>Sun Microsystems     sun!steved

Sigh!  i sent my response before reading Steve's, and now I'm confused.
He's surely right for unformatted IO, since 12.9.5.1 says "exactly one
record is read or written".  The sentence he quotes for formatted IO
indeed implies that at least one record is read.  But that appears to
contradict what I found in 12.9.

Please permit a rapid withdrawal of my last post - I just don't know!