??? 03/12/08 05:24 Read: times |
#152144 - converting a long to acsii char * |
I am wanna convert a long into string or char *. I have the keil compiler but unfortunately the standard librarys sprintf doesn't support long to char * conversion. So, i am pretty sure i need to write my own. I am more than capable of figuring it out myself but, i would rather not reinvent the wheel. So, if any one has library or example code please post it. thanks.
scott long value; char buf[32]; void long2char(char s*, unsigned long value) { } |
Topic | Author | Date |
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 |