Matthias Weingart wrote:
Just curious, did somebody here used sprintf and floats successfully?

Using
  float value;
  char s[20];
  sprintf(s,"%f", value);
> I get
>  main.c:329: warning: double format, float arg (arg 3)
> and it prints something like "ff".

%f is not implemented in the *printf function(s) in mspgcc. you have to supply your own implementation if you want that format.

one of the reasons is that floats are rarely used and the format implementation in *printf would use too much code for these users.

chris

Reply via email to