| ??? 05/18/01 19:40 Read: times |
#11698 - RE: integer to character!! |
You only seem to be asking about decimal conversion, but here are a couple of hexidecimal techniques (in 'C' language)
Technique 1: <code> char nibble_to_char( unsigned digit ) { if ( digit <= 9 ) return '0' + digit; else return 'a' + (digit & 0xF) - 10; } </code> Technique 2: <code> char *hexchars = "0123456789abcdef"; char nibble_to_char( unsigned digit ) { return hexchars[digit & 0xF]; } </code> I hope this HTML stuff works! <>< Lance. |
| Topic | Author | Date |
| integer to character!! | 01/01/70 00:00 | |
| RE: integer to character!! | 01/01/70 00:00 | |
| RE: integer to character!! | 01/01/70 00:00 | |
use ASCII | 01/01/70 00:00 |



