Number of digits in a number [82]


[Prev][Next][Index][Thread]

Number of digits in a number [82]



I need to know how to find the number of digits in a number. For
example:


Number: Digits:
.1234   4
1.23     3
9          1


For those interested, this is for the second flag passed to the round(
function. Its for a convert program I've been working on, and it would
help if I could round the answer to the number of significant digits.


Please E-Mail responses. Thanks in advance.


P.S.: Right now, the program is ~<1k and does standard to and from
metric, as well as time conversions. If anyone wants me to post it,
just E-Mail me.
<pre>
---
Matt Maurano
mtm@maurano.com
</pre>