User manual
mikroC PRO for dsPIC
MikroElektronika
717
LongToStr
Prototype
void LongToStr(long input, char *output);
Description Converts input signed long integer number to a string. The output string has xed width of 12 characters
including null character at the end (string termination). The output string is right justied and the
remaining positions on the left (if any) are lled with blanks.
Parameters
- input: signed long integer number to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 12 characters in length.
Example
long jj = -3700000;
char txt[12];
...
LongToStr(jj, txt);
// txt is “ -3700000” (three blanks here)
Notes None.
LongWordToStr
Prototype
void LongWordToStr(unsigned long input, char *output);
Description Converts input unsigned long integer number to a string. The output string has xed width of 11
characters including null character at the end (string termination). The output string is right justied
and the remaining positions on the left (if any) are lled with blanks.
Parameters
- input: unsigned long integer number to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 11 characters in length.
Example
unsigned long jj = 3700000;
char txt[11];
...
LongWordToStr(jj, txt);
// txt is “ 3700000” (three blanks here)
Notes None.