Mikroc, Shorttostr, Wordtostr – ABL electronic PIC Microcontrollers PIC16 User Manual
Page 308: Inttostr

mikroC - C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
300
MikroElektronika: Development tools - Books - Compilers
page
Prototype
void
ShortToStr(short number, char *output);
Description
Function creates an
output
string out of a small signed
number
(numerical value less
than 0x100). Output string has fixed width of 4 characters; remaining positions on the
left (if any) are filled with blanks.
Example
short
t = -24;
char
*txt;
//...
ByteToStr(t, txt);
// txt is " -24" (one blank here)
ShortToStr
Prototype
void
WordToStr(unsigned number, char *output);
Description
Function creates an
output
string out of an unsigned
number
(numerical value of
unsigned
type). Output string has fixed width of 5 characters; remaining positions on
the left (if any) are filled with blanks.
Example
unsigned
t = 437;
char
*txt;
//...
WordToStr(t, txt);
// txt is " 437" (two blanks here)
WordToStr
Prototype
void
IntToStr(int number, char *output);
Description
Function creates an
output
string out of a signed
number
(numerical value of
int
type). Output string has fixed width of 6 characters; remaining positions on the left (if
any) are filled with blanks.
Example
int
j = -4220;
char
*txt;
//...
IntToStr(j, txt);
// txt is " -4220" (one blank here)
IntToStr