home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!cs.utexas.edu!torn!news.ccs.queensu.ca!qucis.queensu.ca!kirkwood
- From: kirkwood@qucis.queensu.ca (Scott Kirkwood)
- Subject: C++ classes submitted to comp.sources.misc.
- Message-ID: <1992Dec13.231515.15658@qucis.queensu.ca>
- Organization: Computing & Information Science, Queen's University at Kingston
- Date: Sun, 13 Dec 1992 23:15:15 GMT
- Lines: 40
-
- Since we don't have a comp.source.c++ group, I thought you would like
- to know that I submitted three classes to comp.sources.misc:
- IFormat fast integer number formatter,
- FFormat floating point number formatter,
- TFormat template version of FFormat. (included with fformat)
-
- IFormat was designed to be fast and was originally designed to be used
- in a program that lists directories with their file sizes. FFormat is
- far from fast, but is more powerful and extendible. All of these
- programs will format the number so that it fits a certain specified
- width. If the number doesn't fit, the program will attempt to use SI
- postfix notation to make it fit.
-
- For example,
- IFormat
- 12345678 -> 12,345,678 (/any/ width)
- 12345678 -> 12,345K (width set to 7)
- FFormat
- 1234.56789012 -> 1,234.5678 9012
- 1234.56789012 -> 1,234.6 (width set to 7)
- 1234.56789012 -> 1K (width set to 2)
- TFormat<Integer>
- // using g++'s arbitrary size Integer class
- 123456789012345678901 -> 123,456,789,012,345,678,901
-
- These are not programs, but classes and are not useful by themselves.
- One day I hope that there will be many (free) classes that can be
- re-used by everyone.
-
- I'd appreciate any comments you have.
-
- -------------------- kirkwood@qucis.queensu.ca ----------------------
- 299,792,458 m/s it's not just a good idea, it's the law!
-
-
-
- --
- -------------------- kirkwood@qucis.queensu.ca ----------------------
- 299,792,458 m/s it's not just a good idea, it's the law!
-
-