User manual

mikroBasic PRO for PIC32
MikroElektronika
591
LongIntToHex
Prototype
sub procedure LongIntToHex(dim input as longint, dim byref output as
string[8])
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: longint number to be converted
- output: destination string
Returns Nothing.
Requires Nothing.
Example
dim input as longint
txt as string[8]
input = -2147483648
LongIntToHex(input, txt) ‘ txt is “80000000”
Notes None.
StrToInt
Prototype
sub function StrToInt(dim byref input as string[6]) as integer
Description Converts a string to an integer.
Parameters - input: string to be converted
Returns Integer variable.
Requires Input string is assumed to be the correct representation of a number. The conversion will end with the
rst character which is not a decimal digit.
Example
dim ii as integer
main:
...
ii = StrToInt(“-1234”)
end.
Notes None.