Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 216583

Forum Post: RE: F28035 sprintf doesn't work for floats

$
0
0

Hi,

 [quote] sprintf(text_1, “%s\n\r\0”, dtoa(print_str, num);[/quote]

KC1, the above method is for the ones who don't have libraries to play with. I was expecting the sprintf to function in this way:

double a = 0.0000005l; char aa[50]; sprintf(aa,a); sci_msg(aa);

It didn't work. Later found out that CCS supports the following pattern:

sprintf(char *_string, const char *_format, ...)

So, chose some other way to achieve the same!

Regards,

Gautam

 


Viewing all articles
Browse latest Browse all 216583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>