problem with string conversion to double (2)

Wayne Innes winnes at ortex.com
Sun May 13 19:19:34 BST 2001


It looks like you don't have a prototype for atof(). Make sure you have
included <stdlib.h>. NaN means "not a number", if you have no protoype the
compiler assumes int is being being returned when in fact it is a double.

-----Original Message-----
From: Mailing list agent [mailto:mdom at barney.cs.uni-potsdam.de]On Behalf
Of Eric Klumpp
Sent: Monday, May 14, 2001 9:05 AM
To: kdevelop at kdevelop.org
Subject: problem with string conversion to double (2)


I have done other tests.

In fact, num=atof(txt) doesn't work and give me "-NaN". But if I do it
an other time just after, I have the good value in num. But If I repeat
sscanf(txt,"%lf",&num), I have each time "-NaN".
If I put the line num=atof(txt) in a subfunction, I must also use two
time the subfunction to have the good value.
I can't understand what is the problem, but it's not the first time I am
confronted with such a problem !

Is it the bebugger of kedevelop that doesn't show the real value of num
? But if it is the case, the wrong value is conserved when the function
ends and returns num.

Help !!!!

Eric

--
_____________________________________________________________

Eric Klumpp
                                             \\\\\////
email : eric.klumpp at emailforever.com         / ^   - \
                                            ( (o) (o) )
________________________________________oOOO____(_)____OOOo__



-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org
with the following body:
unsubscribe ;your-email-address+


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list