|Location||Toolkit II, THOR XVI|
This function returns the decimal value of a hexadecimal number. The hexadecimal system of numbering is based upon base 16, which means that instead of each digit being in the range 0..9 (as in decimal), each digit can actually hold the value 0..15.
Because a digit can only be one character, a system was devised for representing the value 10..15 - these values are represented by the letters A..F respectively. Any digits outside the range 0..F will cause an ‘error in expression’.
Hex$ can be anything in the range $80000000 (which equates to -2^31) to $79999999 (which equates to 2^31-1).
will print the value 15.
will print the value 16.
PRINT HEX ('1AB').