This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Possible bug with stream access positioning of a file pointer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]