Tech Tip: Utility Method Decimal to Hexadecimal
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: November 29, 2022
The Utility Method below takes in a single integer as a parameter and returns its hexadecimal alpha representation
Dec2Hex($1)
#DECLARE($val : Integer)->$result : Text If (Count parameters=1) $result:=String($val; "&x") End if |
Example:
$result:=Dec2Hex(10) // returns 0x000A |