User manual
590
mikoBasic PRO for PIC32
MikroElektronika
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.
LongWordToHex
Prototype
sub procedure LongWordToHex(dim input as longword, dim byref output as
string[8])
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: double word number to be converted
- output: destination string
Returns Nothing.
Example
dim input as longword
txt as string[8]
input = 65535
LongWordToHex(input, txt) ‘ txt is “0000FFFF”
Notes None.