On Fri, 20 Jul 2001, 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? Yeah, you can printf() to function, but not to a string. How about this: /***WARNING: UNTESTED CODE AHEAD***/ // Assumes string1 is global, and that this is where // you want to append the output of printf(). All this // does is strcat the output of printf() so you can do this: // printf(strcheese, "%U", Hours); and tack the ASCII // representation of an int onto the end of a string. void strcheese(char *cheese) { strcat(string1, cheese); } Think this will work? Dale -- A train stops at a train station. A bus stops at a bus station. On my desk I have a workstation... -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu