|
On Wed, 27 Feb 2002 bmorris@ca.ibm.com wrote: > James, atoi() is ok for a subset of the char-to-dec problems. > atoll() handles a few more (up to about 18 digits). But there's > no complete solution for values with decimals like '1.23'. > You can call atof(), but that introduces errors through floating > point. You can write your own procedure with a return type that's > ok for almost everything, say (30,9), but if you have a string > with 10 decimal places, you have to do some more work. I see your point. I actually did write my own atoi() to handle decimal numbers. I will be releasing it shortly. James Rich james@eaerich.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.