home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16802 < prev    next >
Encoding:
Internet Message Format  |  1992-11-24  |  1.1 KB

  1. Xref: sparky comp.lang.c:16802 comp.lang.c++:16574
  2. Path: sparky!uunet!stanford.edu!agate!dog.ee.lbl.gov!horse.ee.lbl.gov!torek
  3. From: torek@horse.ee.lbl.gov (Chris Torek)
  4. Newsgroups: comp.lang.c,comp.lang.c++
  5. Subject: Re: Converting an int or a float into a string*???
  6. Date: 19 Nov 1992 18:35:13 GMT
  7. Organization: Lawrence Berkeley Laboratory, Berkeley
  8. Lines: 12
  9. Message-ID: <27541@dog.ee.lbl.gov>
  10. References: <1992Nov13.135058.5330@magnus.acs.ohio-state.edu> <mT1cuB12w165w@rhps.chi.il.us>
  11. Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
  12. NNTP-Posting-Host: 128.3.112.15
  13.  
  14. In article <mT1cuB12w165w@rhps.chi.il.us> warlok@rhps.chi.il.us
  15. (Jon L Fincher) writes:
  16. >You could try to standard C function fcvt() ...
  17.  
  18. This, like previous advice to call gcvt(), is suspect at best.  I
  19. cannot speak for C++, but fcvt() is not an ANSI C function, and is not
  20. present in all implementations.  In particular, we removed it from the
  21. 4.4BSD C library.  Fcvt() merely implemented sprintf()'s `%f' format
  22. anyway, so if you want that behavior, use sprintf().
  23. -- 
  24. In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
  25. Berkeley, CA        Domain:    torek@ee.lbl.gov
  26.