Well I did try what you said( double and float), but still not right.
Finally I checked the parsing string to recText byte by byte, I found
out that the some of the begining of recText is blank space which
downloaded from
Sybase. So I just shift one byte if it is blank space, it works now.
FlpAToF(recText)
will not strip off the space!


Thank you very much for your response!

Steve

-----Original Message-----
From: Elia Freedman [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 28, 2000 11:25 AM
To: Palm Developer Forum
Subject: RE: Eric, please help on FlpAToF(Char * s) function!


You are going from a double to a float.  You should probably declare Y
as a
double instead, although it may not mean anything here.  The rest looks
correct.  Is recText pointing to the right thing -- I mean, recText is a
pointer to a string, does the string number you want actually exist?
Try
doing it without a string but rather with a char array.  I don't know if
FlpAToF can handle a pointer (a.k.a, it may manipulate the passed
variable
in place).
Elia

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

float   Y[0];
CharPtr     recText;
FlpCompDouble Stack;

Stack.fd =FlpAToF(recText);
Y[0]=Stack.d;


Sometimes it works such as 1.2, but sometimes such as 0.47  doesn't
work(return 0)even
though recText 0.47 draw on the screen.





-- 
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