There is nothing to stop you from linking a sprintf function into app.
You could then use your version of sprintf instead of the PalmOS
version.  The Palm version is just there to help keep apps smaller.

But, if your compiler does not offer floating point support and a stdio
library the problem is trickier.  You can find source for decent
implementations of sprintf() floating around (pun intended), but then
you have to make sure that the math library and stdio routines expect
the same implementation of float values.

Frankly, if you can get by with 4 or less decimal places of precision I
think you are almost always better off converting your floating point
calculations to integer.  It takes some work, but you can pick up a lot
of speed.  I also almost always use a table for sin/cos.  You can do
both with a pretty small table and it is way faster than most
computational methods.

Good Luck,
-jjf


-----Original Message-----
From: Carsten Scharfenberg [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 05, 2000 9:23 AM
To: Palm Developer Forum
Subject: floating point to string conversion


I just began developing programs for my new Handspring Visor. I'm using
OnBoardC so I have no access to standard c-libs. And heres's the
problem:
PalmOs does not support floating-point operations. To use mathematical
fuction like sin, cos etc. I downloaded MathLib but still there is  no
function to display a double or convert a double into a string. Does
anybody know how to do this?

Carsten:)


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to