User manual

667
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
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: word 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.
IntToHex
Prototype
procedure IntToHex(input : integer; var output : array[64] 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: integer number to be converted
- output: destination string
Returns Nothing.
Requires Nothing.
Example
var input : integer;
txt : string[4];
//...
input := -32768;
IntToHex(input, txt); // txt is ‘8000’
Notes None.