I have to convert a hexadecimal number to decimal, but don\'t know how. In the AutoIt documentation (pictured below) some constants (being assigned hexadecimal values) are d
As per Documentation - Language Reference - Datatypes:
In AutoIt there is only one datatype called a Variant. A variant can contain numeric or string data and decides how to use the data depending on the situation it is being used in.
Issuing:
ConsoleWrite(0x00200000 & @LF)
demonstrates stated behavior. Use Int() in case of conversion requirement:
#region Hex2Dec
Global Const $dBin1 = 0x00200000
Global Const $iInt1 = Int($dBin1)
ConsoleWrite($iInt1 & @LF)
#endregion
#region Dec2Hex
Global Const $iInt2 = 8192
Global Const $dBin2 = Hex($iInt2)
ConsoleWrite('0x' & $dBin2 & @LF)
#endregion
Related functions include: