MyChat Scripts Engine: HexToInt
Convert hexadecimal number to decimal number.
Syntax
function HexToInt(sValue: string): cardinal;
Parameters and return values
Parameter |
Type |
Value |
sValue |
string |
initial hexadecimal number as a string. |
Function result
Decimal number.
Example
begin
mLogScript(IntToStr(HexToInt('FF')), 'FF');
mLogScript(IntToStr(HexToInt('FFFF')), 'FFFF');
mLogScript(IntToStr(HexToInt('ABCD')), 'ABCD');
end.
Script work result
[17:20:02] (Log "HexToInt"): [FF] 255
[17:20:02] (Log "HexToInt"): [FFFF] 65535
[17:20:02] (Log "HexToInt"): [ABCD] 43981
[17:20:02] (Run "HexToInt"): Script operation time: 3 ms
[17:20:02] (Run "HexToInt"): Script done successfully.