home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16164 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1.7 KB  |  40 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!think.com!cass.ma02.bull.com!mips2!bubba!scannell
  3. From: scannell@bubba.ma30.bull.com (P Scannell)
  4. Subject: Re: Just what is so great about streams?
  5. Reply-To: P.Scannell@bull.com
  6. Organization: Bull HN, Worldwide Information Systems, Billerica, Mass., USA
  7. Date: 12 Nov 92 12:03:12
  8. Message-ID: <SCANNELL.92Nov12120312@bubba.ma30.bull.com>
  9. In-Reply-To: tim@gold.iss.nus.sg's message of Thu, 12 Nov 1992 06:19:42 GMT
  10. References: <1992Nov12.061942.16473@nuscc.nus.sg>
  11. Sender: news@mips2.ma30.bull.com (Usenet News Manager)
  12. Lines: 26
  13.  
  14. In article <1992Nov12.061942.16473@nuscc.nus.sg> tim@gold.iss.nus.sg (Tim Poston) writes:
  15.  
  16.    a number very near zero should _not_ be output as 1.472e-6
  17.    It should be 0.0, or PostScript will barf.
  18.  
  19.    So I have to use a function call to say
  20.    "Please Mom, I want the next one decimal,"
  21.    pass a number,
  22.    say "Please Mom, I want the next one decimal,"
  23.    pass another number,
  24.    say "Please Mom, I want the next one decimal,"
  25.    pass another number,...
  26.  
  27. I may be wrong, as I haven't mucked with streams in a while,
  28. but it seems to me that the C++ way to handle this
  29. situation would be to derive a postscript stream class
  30. whose "<<" operator for floating point handled
  31. the case as desired.  The whole point of a stream
  32. CLASS is that it allows you to do that sort of thing.
  33.  
  34. The fact that a lot of compilers have buggy implementations
  35. has no bearing on whether the concept is good or bad.
  36. --
  37.  == Pat Scannell                      Bull HN Information Systems Inc. ==
  38.  == (508) 294-2190                    300 Concord Road   MA30-826A     ==
  39.  == P.Scannell@bull.com               Billerica, MA 01821              ==
  40.