Whenever a number data type of real or longint is defined, 4D will default the number to the decimal number system. However, it is also possible to define these number data types using the hexadecimal format prefixed with "0x" base. This trick can be useful for 4D commands like Char() since both the decimal and hexadecimal format can be taken as input and will output the correct character. Take the example below as the omega symbol will be returned given both its decimal and hexadecimal value.
$num2_l:=0x03A9 // this will be automatically converted to its decimal value
With this behavior, there is no longer any need to manually convert a hexadecimal to decimal. All that is needed is to assign the hexadecimal value to a real or longint number type.