Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/12/08 14:23
Read: times


 
#152172 - code example
Responding to: ???'s previous message
char dec2ascii( char value )
{
return '0' + value;
}

char long2string( char *s, long value)
{
short remainder;
char count=0;

do{
remainder = value % 10;
value = value - remainder;
value = value / 10;
s[count++] = dec2ascii( remainder );
}while( 0 != value );
return count;
}


List of 12 messages in thread
TopicAuthorDate
converting a long to acsii char *            01/01/70 00:00      
   sprintf() works fine.            01/01/70 00:00      
      Maybe; maybe not            01/01/70 00:00      
      I am going to try %ul as a sprintf specifier            01/01/70 00:00      
   Oh yes it does!            01/01/70 00:00      
      Mod10, than divide works tooo            01/01/70 00:00      
   code example            01/01/70 00:00      
      superfluous line of code            01/01/70 00:00      
   better code example            01/01/70 00:00      
      still applies to 'better code'            01/01/70 00:00      
      How to post source code            01/01/70 00:00      
      Why 32 char buffer?            01/01/70 00:00      

Back to Subject List