User manual

mikroPascal PRO for PIC32
MikroElektronika
579
ShortToHex
Prototype
procedure ShortToHex(input : short; var output : array[2] of char);
Description Converts input number to a string containing the number’s hexadecimal representation. The output
string is right justied and remaining positions on the left (if any) are lled with zeros.
Parameters - input: signed short number to be converted
- output: destination string
Returns Nothing.
Requires Nothing.
Example
var t : short;
txt : array[2] of char;
...
t := -100;
ShortToHex(t, txt); // txt is “9C”
Notes None.
WordToHex
Prototype
procedure WordToHex(input : word; var output : array[4] of char);
Description Converts input number to a string containing the number’s hexadecimal representation. The output
string is right justied 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 Nothing.
Example
var t : word;
txt : array[4] of char;
...
t := 1111;
WordToHex(t, txt); // txt is “0457”
Notes None.