HEX$ in SmileBasic V1 is identical to that in V2.
HEX$(number) will create a string representation of the hexadecimal value
number, after it has been rounded down if it is not an integer.
F are always in uppercase. If
number is negative, the 2's complement in 20 bits is shown.
HEX$(number, digits) will create a string representation as above, but will always create a string which is
digits characters long.
digits must be between 1 and 5 (inclusive). If the number cannot be expressed in
digits characters (including at least one sign bit for negative numbers), the function generates
Illegal function call (HEX$).
HEX$ in SmileBasic V3 is similar to that in V2 (except the signed integers appear to be stored in 32 bits, so
digits is presumably allowed to be as much as 8,
HEX$(-1) would make
HEX$(-524287) would give