Question Kryštof Matějka · Jul 22, 2016 Hex to dec #Caché Hello, has Cache built-in function for converting hexadecimal number to decimal?
Dmitry Maslennikov · Jul 22, 2016 $zhexhex to dec write $zhex("99") 153 and back, dec to hex write $zhex(153) 99 be careful, hexadecimal should be a string and decimal should be a number
Michael Braam · Jul 22, 2016 You have a couple of choices.Either use the built in function $zhex or %SYSTEM.Utils.HexToDecimal or %SYSTEM.Utils.DecimalToHex.See the documentation for detailsHope this helps.
Richard Rael · Jul 22, 2016 You can also use %XD and %DX if you want something that prompts:USER>d ^%XD Hex: FFF Decimal: 4095Hex: USER>d ^%DX Decimal: 1240 Hex: 4D8Decimal:
$zhex
hex to dec
and back, dec to hex
be careful, hexadecimal should be a string and decimal should be a number
Great, thanks.
You have a couple of choices.
Either use the built in function $zhex or %SYSTEM.Utils.HexToDecimal or %SYSTEM.Utils.DecimalToHex.
See the documentation for details
Hope this helps.
You can also use %XD and %DX if you want something that prompts:
USER>d ^%XD
Hex: FFF Decimal: 4095
Hex:
USER>d ^%DX
Decimal: 1240 Hex: 4D8
Decimal: