🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Axel Thimm Fri, 01 Mar 1996 20:43
Streams and eof()
#913
Author: Axel Thimm
Date: Fri, 01 Mar 1996 20:43
21 lines
1302 bytes
Hello,

I have had a look in the April draft, but I think that there is a small
ambiguity about eof() methods in streams.
Is the eof-flag raised, when the end of the stream is reached, or when
an attempt to move past this end is made? I think the most common
practice is the latter, but the ANSI draft uses the former statement.
Declaring the end of a stream as the first charachter _after_ the last
character of the stream would rescue the expression, but wouldn't fit
into a concept of an end. (Usually one thinks of an end as belonging to
the whole)
As I am rather convinced, that the eof is raised at an attempt to meove
past the end, I'd like to ask how to check this in a binary file without
having to perform a movement.

Regards,
	Axel.
===
Axel Thimm <axl@zedat.fu-berlin.de>
Freie Universitaet Berlin
===
Re: Streams and eof()
#920
Author: Lothar Brendel
Date: Tue, 05 Mar 1996 14:53
21 lines
1111 bytes
Hi!

Sorry, this is not an answer but another question:
"istrstream and eof()"

When does a istrstream gives eof==true?
	At the end of the buffer?
	Or if it hits a '\0'?
	Or if it hits something else special?


asks
	Lothar
-- 
---------------------------------------------------------------
  Seht, das dicke Huhn auf dem Dach. Ist es nicht (ein wenig)
  wie der Wind in den Weiden?   - Walter Moers, 1985 -


  Lothar Brendel        email   : l.brendel@kfa-juelich.de
  HLRZ, Tel. 2320       WWW     : -
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads