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