Bob, True CCS does not doe sprintf(), however they have a variation of printf() it's a bit strange to setup it goes like this char* pS; char Array[20]; // length your choice void MakeString(char c) // name this function to anything you like { *pS++ = c; } Somewhere where you need it, make a call to printf like this printf( MakeString,"This is the string"); The Array now contains the string "This is the string" It's handy for converting floats float fVar ; fVar = 123.456; printf( MakeString,"%f", fVar); Array now contains the ascii of float value 123.456; May be this has been covered before, I expect it has, hope it helps; Hans W Bob Barr wrote: > Lawrence Lile wrote: > > > >+AD4- The function you're looking for here is 'sprintf'. It takes the > >general > >+AD4- form: > >+AD4- > >+AD4- sprintf(string1, +ACIAJQ-d+ACI-, Hours)+ADs- > >+AD4- > >+AD4- See your docs for details on additional formatting options. It > >'prints' > >the > >+AD4- value to the string and has the same options as 'printf'. > > > > > >Hmmm. CCS doesn't seem to recognize sprintf. Anybody got any code for > >this > >one? > > > > AARGH!!! > > Sorry about the error on my part. I ASSumed that your compiler supported > sprintf. (I don't think that I've ever seen a compiler with printf support > that didn't include the sprintf variant.) > > Now, if you will excuse me, I have some egg that I need to remove from my > face. > > Regards, Bob > > BTW, is there some setting in your mail program that mangles characters? > Your subjects show up with '+AF' stuff instead of the brackets around the > PIC topic tag. > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu