Re: Error writing on unit 22
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Thu, 2 Apr 2009 09:57:32 -0700
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
.
- References:
- Error writing on unit 22
- From: bru
- Re: Error writing on unit 22
- From: Dave Allured
- Re: Error writing on unit 22
- From: bru
- Re: Error writing on unit 22
- From: Richard Maine
- Re: Error writing on unit 22
- From: Gordon Sande
- Error writing on unit 22
- Prev by Date: Re: Unexpected 15 digits precision from "REAL"
- Next by Date: Re: 50 years of progress in the language
- Previous by thread: Re: Error writing on unit 22
- Next by thread: Re: Error writing on unit 22
- Index(es):
Relevant Pages
|