On Monday 17 March 2003 06:26 am, Richard Osborne wrote: > 2. Unfortunately I do need most of the functionalities of the > sprintf command. Below is a cut down of what I am trying to > achieve, for now. itoa will not be enough for what I need in the > long run. > > int stringLength; > char tempChar[20], tempChar[20]; > float fullPixelMove = 2.57; > > sprintf(tempChar,"%.2f", fullPixelMove); See the float printing routine that I posted earlier. > stringLength = strlen(tempChar); > sprintf(tempChar2,"0.%c%c",tempChar[stringLength-2],tempChar[string >Length-1] ); That's just plain inefficient. /* fill in tempChar with float */ unsigned char stringLength; stringLength = fmtfloat(fullPixelMove, tempChar, 2); tempChar[ stringLength - 4 ] = '0'; -- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu