Re: backspace error (reading file from the end)



Richard Maine wrote:
On Sun, 6 Aug 2006 23:03:51 -0700, leaf wrote
Backspacing from the current record n is performed by rewinding to the
start of the file and then performing n-1 successive READs to reach the
previous record.

The standard says nothing like this. I didn't even think it was a particularly common implementation choice. Why would it be for formatted files in most current systems? I'd expect the system to be able to search backwards for the previous record terminator pretty easily. Since I tend to avoid BACKSPACE, I guess I'm not sure on this - I probably wouldn't have noticed. But still, such an implementation would moderately surprise me.

Plugging the phrase into Google indicates that "leaf" is quoting from the Compaq Fortran user manual. It would have been rather helpful if he'd said so, rather than implying that this was something of general applicability that he'd written himself.

- Brooks


--
The "bmoses-nospam" address is valid; no unmunging needed.
.



Relevant Pages

  • Re: Function PRESENT and logical combinations
    ... James Giles wrote: ... > Richard Maine wrote: ... >>about the standard or the poster. ... >>represent omission of the implied qualification. ...
    (comp.lang.fortran)
  • Re: TRANSFER arbitrary data ? (long)
    ... Richard Maine wrote: ... The standard says yes in two specific cases, ... to get the actual separately allocated memory area where the data lies. ...
    (comp.lang.fortran)
  • Re: difficulty with random_number()
    ... Richard Maine wrote: ... (snip on RANDOM_SEED, I wrote) ... of the standard. ... supply a single INTEGER such that RANDOM_SEED would select ...
    (comp.lang.fortran)
  • Re: Which compiler
    ... > behavior does not violate the standard. ... I was sort of expecting Richard Maine to pop up now that I ... the first character of the record when using list-directed output? ... " Except for continuation of delimited character sequences, ...
    (comp.lang.fortran)
  • Re: Portability question
    ... Is the new standard any clearer about this issue? ... I am the person Richard Maine mentions below. ... >is the intended interpretation" than to rewrite major portions of the ... not fit the definitions of data types given in Sections 2.4.1 and 4.0. ...
    (comp.lang.fortran)