Re: fseek
From: Alan Balmer (albalmer_at_att.net)
Date: 11/12/03
- Next message: Alan Balmer: "Re: [OT] Re: Asking if elements in struct arre zero"
- Previous message: Programmer Dude: "Re: Asking if elements in struct arre zero"
- In reply to: Dan Pop: "Re: fseek"
- Next in thread: lawrence.jones_at_eds.com: "Re: fseek"
- Reply: lawrence.jones_at_eds.com: "Re: fseek"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 12 Nov 2003 11:33:05 -0700
On 12 Nov 2003 17:27:25 GMT, Dan.Pop@cern.ch (Dan Pop) wrote:
>In <d8j4rvo967qj9ji44rdg02gsedred00kpo@4ax.com> Alan Balmer <albalmer@att.net> writes:
>
>>On 12 Nov 2003 13:26:55 GMT, Dan.Pop@cern.ch (Dan Pop) wrote:
>>
>>>>Which was exactly the point. There's more involved in seeking a text
>>>>stream than simply counting characters.
>>>
>>>And yet, you claim that you can use character offsets as arguments to a
>>>fseek call on a text stream.
>>
>>Of course you can. You can also use random numbers.
>
>The idea was to be able to seek to well defined positions inside the file.
>
>>I don't claim to
>>be able to portably relate the results to anything in particular.
>
>In general, the results of ftell on a binary stream are
>useless/meaningless to any text stream on the same implementation.
>
>The thing you don't get is that the encoding of the file position returned
>by ftell on a text stream need not be a plain byte offset. It could be
>a record number and a byte offset inside the record.
>
>Dan
Sorry to dispell your illusion of omniscience (do you fancy yourself a
telepath?), but you have no idea what I "get" and "don't get." I not
only "get" that possibility, I have designed storage systems using
similar methodology. What *you* don't "get" (or at least want to argue
about) is that any file may be opened in binary mode, and a character
offset generated by fseek/ftell. The standard does not preclude using
that offset in fseek on a text file. Obviously, as I stated
previously, the standard says nothing about the usefulness of doing
this. You say this is an "obvious bug" in the standard. I suggest you
submit it for correction.
-- Al Balmer Balmer Consulting removebalmerconsultingthis@att.net
- Next message: Alan Balmer: "Re: [OT] Re: Asking if elements in struct arre zero"
- Previous message: Programmer Dude: "Re: Asking if elements in struct arre zero"
- In reply to: Dan Pop: "Re: fseek"
- Next in thread: lawrence.jones_at_eds.com: "Re: fseek"
- Reply: lawrence.jones_at_eds.com: "Re: fseek"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|