home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: iostreams bug in BC?
- Message-ID: <1992Nov19.200653.24155@taumet.com>
- Keywords: whitespace; stream; borland; cfront; fail
- Organization: TauMetric Corporation
- References: <1992Nov18.154925.5930@siesoft.co.uk>
- Date: Thu, 19 Nov 1992 20:06:53 GMT
- Lines: 42
-
- huw@siesoft.co.uk (Huw Roberts) writes:
-
- >I have a problem with BC++ 3.1. I'm not sure what the correct behaviour is
- >so I can't tell whether or not it's a bug. The program certainly behaves
- >differently on cfront:
-
- > ...
- > istrstream fred (" 35 ");
- > int x;
- > fred >> x >> ws;
- > if (fred.fail())
- > cout << "You're kidding!`n";
-
- >Borland produces the message, cfront does not.
-
- >* Is this a bug in the Borland iostream library?
-
- I would say it is a bug. In this case EOF is reached while extracting
- whitespace. If this were part of "whitespace skipping" when trying
- to extract something else, it would be an error, and 'fail' should
- be set. In this case, EOF is reached and nothing further has been
- requested. I believe this should not set the 'fail' bit.
-
- >* Does anyone have a reference to an ARM equivalent for the stram library -
- > The C++ Programming Language (2nd Ed.) doesn't go into quite enough detail
- > in this area.
-
- There is no definitive reference for iostreams. The best documentation
- currently available is the AT&T (now USL) C++ library manuals which
- include iostreams. There are some errors and omissions in the
- documentation, but I don't know of a better source. You can buy the
- manuals from USL, last time I checked.
-
- The C++ Committee is working on a definition for iostreams which will
- eventually become part of the C++ Standard. A draft of the iostream
- specification was accepted by the Committee at the last meeting, but
- I'm sure there will be some minor changes to it before the Standard is
- ready for public review.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
- Vice Chair, ANSI C++ Committee, X3J16
-