This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Possible bug with stream access positioning of a file pointer
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Matthew Gilson <mlr54 at wildcats dot unh dot edu>
- Cc: fortran at gcc dot gnu dot org
- Date: Fri, 26 Apr 2013 12:22:07 -0700
- Subject: Re: Possible bug with stream access positioning of a file pointer
- References: <517AD0AA dot 4030704 at wildcats dot unh dot edu>
On Fri, Apr 26, 2013 at 03:08:26PM -0400, Matthew Gilson wrote:
> open(unit=funit,file=fname,status='UNKNOWN',form='FORMATTED',access='STREAM')
>
> My impression was that the two approaches should give the same results,
> but it appears that when FSEEKABLE is defined (e.g. using `inquire`),
> `tell` is consistently returning values slightly higher than when it is
> a simple wrapper around `ftell`. Also note that using `ftell` and
> `fseek` give the results that I expect -- Using `inquire` and `read`
> give results which seem erroneous to me.
>
Either provide a complete compilable example or a url to
a complete compilable example and an example data file,
so everyone can have a well defined problem. 'returning
values slightly higher' has absolute no meaning. Is it
an off-by-one problem or some random value between 42 and
1234567?
--
Steve