User manual
mikroC PRO for dsPIC
MikroElektronika
719
WordToStrWithZeros
Prototype
void WordToStrWithZeros(unsigned int input, char *output);
Description Converts input word to a string. The output string has xed width of 6 characters including null character 
at the end (string termination). 
The output string is right justied and remaining positions on the left (if any) are lled with zeros.
Parameters
- input: unsigned integer to be converted 
- output: destination string 
Returns Nothing.
Requires Destination string should be at least 6 characters in length.
Example
unsigned short t = 437;
char txt[6];
...
WordToStrWithZeros(t, txt); // txt is “0437” (one zero here)
Notes None.
IntToStrWithZeros
Prototype
void IntToStrWithZeros(int input, char *output);
Description Converts  input integer  to  a  string. The output  string  has  xed width  of  7 characters  including  null 
character at the end (string termination). 
The output string is right justied and remaining positions on the left (if any) are lled with zeros.
Parameters
- input: integer number to be converted 
- output: destination string 
Returns Nothing.
Requires Destination string should be at least 7 characters in length.
Example
short t = -3276;
char txt[7];
...
IntToStrWithZeros(t, txt); // txt is “-03276” (one zero here)
Notes None.










