User manual

mikroPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
666
ByteToHex
Prototype
procedure ByteToHex(input : byte; 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: byte to be converted
- output: destination string
Returns Nothing.
Requires Nothing.
Example
var t : byte;
txt : array[2] of char;
...
t := 2;
ByteToHex(t, txt); // txt is “02”
Notes None.
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: 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.