Hi all,
Okay, I'm down to my last straw in trying to figure this out. I've searched
the palm.com site, deja.com, and even this list.
Is there something wrong with CW rev 6 when trying to use FlpFToA?
When compiling my source (snippets below) CW always complains that the FlpFToA
"function has no prototype". However, I have included NewFloatMgr.h, set the
Code Generation 68K Processor Floating Point option to "Palm OS", and I can
even see the definitions for FlpFtoA in NewFloatMgr.h.
Interestingly enough, the function FlpAToF works just fine. I'm basin my code
around the Palm Devzone knowledgebase article "How do I convert a float or
double to a string? Alternativly, how do I convert a string to a float or
double?"
Here's the interesting portions of the code:
include <Pilot.h> // all the system toolbox headers
#include <SerialMgr.h>
#include <SysEvtMgr.h>
#include <SystemMgr.h>
#include <NewFloatMgr.h>
#include <StringMgr.h>
#include "GPSRsc.h" // application resource defines
/***********************************************************************
*
* FUNCTION: MainViewHandleEvent
*
* DESCRIPTION: Handles processing of events for the �main� form.
*
* PARAMETERS: event - the most recent event.
*
* RETURNED: True if the event is handled, false otherwise.
*
***********************************************************************/
static Boolean MainViewHandleEvent(EventPtr event)
{
Boolean handled;
Err err;
Boolean updatedTime;
FlpCompDouble AltMetersDouble;
float AltMeters;
FlpCompDouble AltFeetDouble;
float AltFeet;
float FeetPerMeter=3.280840;
(At this point, 's' is a string containing a floating point number such as
"648.72" which I need to convert by multiplying by FeetPerMeter)
AltMetersDouble.fd = FlpAToF ( s );
AltMeters = AltMetersDouble.d;
AltFeetDouble.d =
AltMeters*FeetPerMeter;
//StrIToA( s, (long) AltFeetDouble.d);
FlpFtoA( AltFeetDouble.fd, s );
StrCopy( s + StrLen(s), " Ft\0");
FrmCopyLabel(frm,
GPSMainAltitudeLabel, s);
}
Any input and ideas would certainly be appreciated!
Regards,
Tim
Austin, TX
(hmmm, wonder how far are the Metroworks offices from home?)