I have an issue to convert a float to a string with the Coldfire MCF52259. Here what I am trying to do:
float fval = 1201 / 10;
sprintf (str, "%3.1f\n", fval);
The debugger shows that fval is 120.100. This is what I expect to see. But "str" is not set correctly. If I do the same thing with an integer, there is no problem:
int val = 1201
sprintf (str, "%d\n", val);
What I am doing wrong?
Thanks in advance