Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-lcc!mordor!styx!ames!amdahl!oliveb!sun!steved
From: steved@sun.uucp (Steve Dever)
Newsgroups: comp.lang.fortran
Subject: Re: end= with no input variables ?
Message-ID: <11040@sun.uucp>
Date: Tue, 6-Jan-87 23:55:54 EST
Article-I.D.: sun.11040
Posted: Tue Jan  6 23:55:54 1987
Date-Received: Wed, 7-Jan-87 05:51:05 EST
References: <44400008@hcx1>
Reply-To: steved@sun.UUCP (Steve Dever)
Organization: Sun Microsystems, Mountain View
Lines: 25

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