Re: Error writing on unit 22



Gordon Sande <g.sande@xxxxxxxxxxxxxxxx> wrote:

On 2009-04-02 13:23:05 -0300, nospam@xxxxxxxxxxxxx (Richard Maine) said:

My impression and vague recall is that a BACkSPACE will do the job of
getting back infront of the end-of-file and allow a write. Or is this
another system dependent hack that worked on that system?

That's standard conforming. My recollection was that there used to be
portability problems in that not all compilers exactly conformed to the
standard. In particular, I thougt I recalled that on some compilers,
such a backspace would position you before the last record instead of
after it. This left me a bit reluctant to use it. Seems to me that I
recall more recently (but still a while ago) being shown that pretty
much all current compilers did it "right". Whether my earlier
recollection was wrong or whether the problems got fixed (perhaps just
by disappearance of the non-conforming vendors), I couldn't say.

I have a general reluctance to use backspace anyway. There are contexts
where it has severe performance problems on some implementations. Also,
there are files that can't be backspaced, sometimes for good reason, and
sometimes because of implementation quirks. The old Apple Fortran
running on the UCSD Pascal operating system couldn't backspace any
unformatted file; the docs had a pretty lame attempt at explanation
trying to say that the standard was messed up because such a thing
wasn't implementable. Anyway, the standard does allow for
non-backspaceable files, at the compiler's choice.

I have even fuzzier memories of using an ENDFILE to progress to the second
file of a multifile tape. I am pretty sure that was an IBM hack!

Yep. But one that was copied by some other vendors.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
.



Relevant Pages

  • Re: backspace error (reading file from the end)
    ... using list-directed or namelist formatting. ... That's an "interesting" restriction in the standard. ... The fact that some implementations disallow backspace on some files ...
    (comp.lang.fortran)
  • Re: open source pong or equally simple game
    ... display (assuming that you have a "display" which can backspace), it will be even more boring as you can't take any input from the user without pausing every time and waiting for Enter to be pressed. ... None of these things are specified by the standard. ... "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)
  • Re: how to backspace in vi?
    ... real backspace. ... even if the PC keyboard is not the same. ... ASCII didn't use the same code for BS, ... In standards, a different standard IS in opposition. ...
    (comp.os.linux.misc)
  • Re: Which BSD?
    ... > even though it's been standard on the PC keyboard for, oh, about 20 ... Who uses "backspace" anyway. ... FreeBSD users never needs to correct ...
    (comp.unix.bsd.netbsd.misc)
  • Re: Which BSD?
    ... > even though it's been standard on the PC keyboard for, oh, about 20 ... Who uses "backspace" anyway. ... FreeBSD users never needs to correct ...
    (comp.unix.bsd.freebsd.misc)