home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16583 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.0 KB  |  54 lines

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