| ??? 11/20/02 04:21 Read: times |
#32804 - RE: convert a large hex number to ascii |
Sheesh, it used to be that on this forum, bracketing code with <pre> </pre> would preserve formatting and content, but I see now that not only was my post afflicted with double-spacing, but the line after "s += n;" was affected also. Hopefully you can get the gist of the code without the <pre> </pre> in the example below.
void ltoa( char *s, long bin, unsigned char n ) { if (bin >= 0) *s = '+'; else { *s = '-'; bin = -bin; } s += n; *s = ' '; while (--n) { *--s = (bin % 10) + '0'; bin /= 10; } } |
| Topic | Author | Date |
| convert a large hex number to ascii | 01/01/70 00:00 | |
| RE: convert a large hex number to ascii | 01/01/70 00:00 | |
| RE: convert a large hex number to ascii | 01/01/70 00:00 | |
| RE: convert a large hex number to ascii | 01/01/70 00:00 | |
| RE: convert a large hex number to ascii | 01/01/70 00:00 | |
| RE: convert a large hex number to ascii | 01/01/70 00:00 | |
| RE: convert a large hex number to ascii | 01/01/70 00:00 | |
| RE: convert a large hex number to asc | 01/01/70 00:00 | |
RE: convert a large hex number to ascii | 01/01/70 00:00 |



