I am using K60 & MQX4.0 version. atoi is working fine for me & atof is not working. I have enabled _EWL_FLOATING_POINT in ansi_params.h too. Still atof is not working for me.. Please anyone help me in these.
Thank you for all your support.. Today i fixed the bug.. When it was not working i have included only #include <string.h>.
Now i have included #include <stdlib.h> too.. Now the following code working perfectly with atof feature..
uchar ascii_float = "54321.54321";
The output follows,
The integer value is 12345
The flot value is 54321.54321
The one more change required to make it work atof was type casting..
Hello kandha samy,
any code for sharing? How do you invoke atoi and how atof? How does atof fail?
Please read a following post which explains what you should include in your bug/problem report:
How to post in the MQX section and get an answer!
Thank you for your reply.. Here is the test code which i have tried..
The flot value is 1643769856.000000
So the output shows atoi is working fine & atof is not giving proper output. To make sure that there is some problem with atof i have done one more test..
The flot value is 54321
So, The above test that i concluded atoi is working perfectly & there is some issue with atof...
This is a CW compiler problem
Needs a library bug fix.
In the properties of the project in the Librarian you need to choose the MOdel C9xx
Print format int_FP
In the MQX BSP you need to enable
#define MQX_INCLUDE_FLOATING_POINT_IO 1
This should solve the problem in MQX system
Finally u got it working , I told you so
Deepak Kumar Rana
Field Application Engineer
H.P: +91 9916927803
Campus 1C ,4th Floor Ecospace
Sarjapur Outer Ring Road
Banglore India 560037
Retrieving data ...