FlpAToF requires your string to be in the format [-]x[.]yyyyyyyy[e[-]zz].
"111.0" would have to be represented as "1.110e02". You're probably better
off writing your own conversion routine to convert from your string to a
double value.
Regards,
Steve
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 22, 2000 10:23 AM
> To: Palm Developer Forum
> Subject: float/double <-> string conversion
>
>
> Hello,
>
> I'm writing an application using double. I'm reading datas from serial
> port (GPS NMEA input) and receive some infos, particulary float/double
> as string. I'm trying to convert this string ("111.0") to a double
> value. I've tried an example taht I found in news :
>
> FlpCompDouble palmDouble;
> double myDouble;
>
> palmDouble.fd = FlpAToF ("111.0");
> myDouble = palmDouble.d;
>
> I receive a value of 0.9xxx something. What's wrong ?
>
> Do anyone know another method to convert float/double -> string or
> string -> float/double ?
>
> I need double to use MathLib.
>
> Many thanks for any help.
>
> Didier Kuttel
>
> --
> 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