User manual
mikroC PRO for dsPIC
MikroElektronika
723
LongWordToHex
Prototype
void LongWordToHex(unsigned long input, char *output);
Description Converts input number to a string containing the number’s hexadecimal representation. The output
string has xed width of 9 characters including null character at the end (string termination).
Parameters
- input: unsigned long integer number to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 9 characters in length.
Example
unsigned long jj = 65535;
char txt[9];
...
LongWordToHex(jj, txt); // txt is “0000FFFF”
Notes None.
LongIntToHex
Prototype
void LongIntToHex(long int input, char *output);
Description Converts input number to a string containing the number’s hexadecimal representation. The output
string has xed width of 9 characters including null character at the end (string termination).
Parameters
- input: signed long integer number to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 9 characters in length.
Example
long int jj = -2147483648;
char txt[9];
...
LongIntToHex(jj, txt); // txt is “80000000”
Notes None.