"dilek.ozgu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i use that function. but
> double xx;
>  xx = 816 / 10 ;
> GetStringFromDouble(ss,xx, 2);
> result , ss = > 81 ???? it must be 81.60

Err. That's a C problem, not a problem with the function:

    xx = 816 / 10;

is wrong.  816 and 10 are both integers, so an integer division is done.
The result is converted to a double, hence the 81.00.

    xx = 816.0d / 10.0d;

is what you're after.   Try this.  Trust me that the GetStringFromDouble
function is not at fault.  It's in use in many programs, and always performs
flawlessly.

Alan



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to