User manual
668
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
WordToHex
Prototype
sub procedure WordToHex(dim input as word, dim byref output as string[4])
Description Converts input number to a string containing the number’s hexadecimal representation. The output
string is right justied 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
dim t as word
txt as string[4]
t = 1111
WordToHex(t, txt) ‘ txt is “0457”
Notes None.
IntToHex
Prototype
sub procedure IntToHex(dim input as integer, dim byref output as
string[4])
Description Converts input number to a string containing the number’s hexadecimal representation. The output
string is right justied 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
dim input as integer
txt as string[4]
input = -32768
IntToHex(input, txt) ‘ txt is “8000”
Notes None.