Sep 7, 2006 #1 M mr_byte31 Full Member level 5 Joined Oct 19, 2005 Messages 295 Helped 10 Reputation 20 Reaction score 8 Trophy points 1,298 Activity points 3,241 code vision for avr hi every body i have code vision what i want to do is to show a double number on an lcd i searced for a function to change from double to string but i could'nt found it can any body help
code vision for avr hi every body i have code vision what i want to do is to show a double number on an lcd i searced for a function to change from double to string but i could'nt found it can any body help
Sep 8, 2006 #2 C Cortex Full Member level 3 Joined Mar 26, 2005 Messages 182 Helped 12 Reputation 24 Reaction score 4 Trophy points 1,298 Location Morocco Activity points 2,733 code vision for avr cast your variable
Sep 8, 2006 #3 M mr_byte31 Full Member level 5 Joined Oct 19, 2005 Messages 295 Helped 10 Reputation 20 Reaction score 8 Trophy points 1,298 Activity points 3,241 code vision for avr i am sorry i couldn't undestand can u explain plz
Sep 8, 2006 #4 hr_rezaee Advanced Member level 3 Joined Oct 6, 2004 Messages 747 Helped 109 Reputation 218 Reaction score 24 Trophy points 1,298 Location Iran-Mashhad Activity points 4,025 code vision for avr hi use printf or sprintf functions. regards
Sep 8, 2006 #5 C Cortex Full Member level 3 Joined Mar 26, 2005 Messages 182 Helped 12 Reputation 24 Reaction score 4 Trophy points 1,298 Location Morocco Activity points 2,733 code vision for avr char * inttostr (inttype i, char *buf) { char *p = buf + INT_STRLEN_BOUND (inttype); *p = 0; if (i < 0) { do *--p = '0' - i % 10; while ((i /= 10) != 0); *--p = '-'; } else { do *--p = '0' + i % 10; while ((i /= 10) != 0); } return p; }
code vision for avr char * inttostr (inttype i, char *buf) { char *p = buf + INT_STRLEN_BOUND (inttype); *p = 0; if (i < 0) { do *--p = '0' - i % 10; while ((i /= 10) != 0); *--p = '-'; } else { do *--p = '0' + i % 10; while ((i /= 10) != 0); } return p; }