CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 3 matches
CCS Forum Index
Author Message
  Topic: Question about sprintf and float variables
ccdart

Replies: 3
Views: 7289

PostForum: General CCS C Discussion   Posted: Tue Jan 25, 2005 4:46 pm   Subject: Question about sprintf and float variables
Yup! That does it. I also tried four decimal places and adding .000049, and that seems to work as well. (Though I wonder if that's treading on thin ice...)

Thanks again for the solution!
  Topic: Question about sprintf and float variables
ccdart

Replies: 3
Views: 7289

PostForum: General CCS C Discussion   Posted: Tue Jan 25, 2005 4:36 pm   Subject: Question about sprintf and float variables
Okay, that's pretty much what I was expecting to hear. I'll try your suggestion ASAP... if true, it should be good enough.
  Topic: Question about sprintf and float variables
ccdart

Replies: 3
Views: 7289

PostForum: General CCS C Discussion   Posted: Tue Jan 25, 2005 4:02 pm   Subject: Question about sprintf and float variables
Here is a short test program:

// fuses, etc. not shown
void main(void)
{
signed int8 c=100;
float value=0;
char ascout[20];

value = (float)c;

sprintf(ascout,"%f",value);
}

Now, I'm u ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group