Hex to dec
Hello, has Cache built-in function for converting hexadecimal number to decimal?
Discussion (4)0
Comments
$zhex
hex to dec
write $zhex("99")
153and back, dec to hex
write $zhex(153) 99
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: