------- Comment #4 from jvdelisle at verizon dot net 2006-03-01 14:36 ------- Subject: Re: gfortran - End of File incorrectly positioned after binary I/O.
dir at lanl dot gov wrote: > ------- Comment #3 from dir at lanl dot gov 2006-03-01 13:50 ------- > Hi Jerry, > > The program does > 3 writes - eof after record 3 - write pointer after record 3 > 2 backspaces - eof after record 3 - write pointer after record 1 > 1 write - eof after record 2 - write pointer after record 2 > > The two backspaces backup over the last two writes and the forth write > adds one additional record for a total of 2 records of the file - there should > only be 2 records with the eof jump happening on the third read. > > Hi Dale, My "conceptual" problem is - does the last write truncate the file? I remember reading about this somewhere, but it is vague in my mind. Thats why when I started looking at this I just had to stop and ask. I could see the difference in behavior between gfortran and g77. It puzzled me. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26499