Datasheet

LongToStr
LongWordToStr
564
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void LongToStr(long input, char *output);
Returns Nothing.
Description
Converts input signed long integer number to a string. The output string has
fixed width of 12 characters including null character at the end (string termina-
tion). The output string is right justified and the remaining positions on the left (if
any) are filled with blanks.
Parameters :
- input: signed long integer number to be converted
-
output: destination string
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)
Prototype
void LongWordToStr(unsigned long input, char *output);
Returns Nothing.
Description
Converts input unsigned long integer number to a string. The output string has
fixed width of 11 characters including null character at the end (string termina-
tion). The output string is right justified and the remaining positions on the left (if
any) are filled with blanks.
Parameters :
-
input: unsigned long integer number to be converted
- output: destination string
Requires Destination string should be at least 11 characters in length.
Example
unsigned long jj = 3700000;
char txt[11];
...
LongToStr(jj, txt);
// txt is " 3700000" (three blanks here)