Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hello C-Programmers,
maybe i´m only a little bit stupid, but i try to ask anyway.
If i have a printf like this:
...
printf ("%08.6f", 3.1415);
...
i understand and expected, that "00000003.141500" should be displayed. In mycase only "3.141500" is displayed.
Is my expectation wrong? Did i make an error in the format specifier?
Or is the "08" format specifier specifying the maximum of digits which can be used but not must be used? If yes, why then after the coma, there are 6 digits filled?
Kind Regards
Erwin