User manual

Table Of Contents
mikroC PRO for PIC32
MikroElektronika
631
ByteToStr
Prototype
void ByteToStr(unsigned short input, char *output);
Description Converts input byte to a string. The output string has xed width of 4 characters including null character
at the end (string termination). The output string is right justied and remaining positions on the left (if
any) are lled with blanks.
Parameters - input: byte to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 4 characters in length.
Example
unsigned short t = 24;
char txt[4];
...
ByteToStr(t, txt); // txt is “ 24” (one blank here)
Notes None.
ShortToStr
Prototype
void ShortToStr(short input, char *output);
Description Converts input signed short number to a string. The output string has xed width of 5 characters
including null character at the end (string termination). The output string is right justied and remaining
positions on the left (if any) are lled with blanks.
Parameters - input: signed short number to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 5 characters in length.
Example
short t = -24;
char txt[5];
...
ShortToStr(t, txt); // txt is “ -24” (one blank here)
Notes None.