🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Axel Thimm Sat, 02 Mar 1996 01:43
Streams and eof()
#944
Author: Axel Thimm
Date: Sat, 02 Mar 1996 01:43
41 lines
2557 bytes
[Moderator's note: Please note that this article is crossposted to
three newsgroups, two of which are moderated.  The Followup-to line is
set to comp.std.c++.  You should edit your newsgroups line if your
reply would be more appropriate for some other group(s).  mha]


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
===

      [ Articles to moderate: mailto:c++-submit@netlab.cs.rpi.edu ]
      [  Read the C++ FAQ: http://www.connobj.com/cpp/cppfaq.htm  ]
      [  Moderation policy: http://www.connobj.com/cpp/guide.htm  ]
      [      Comments? mailto:c++-request@netlab.cs.rpi.edu       ]

---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]
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