Toshiba KB-80 Computer Keyboard User Manual


 
- 33 -
HEX$
Function Converts a decimal number to a hexadecimal number, and then provides the
character string.
Format HEX$ ( <numeric expression> )
Explanation <numeric expression> is converted to an integer value which is rounded off to a
whole number before <numeric expression> is used for the HEX$ function.
The result of the HEX$ function is a hexadecimal number (0 to FF). However, a
character variable should be used for the assignment since the result is handled as a
character.
The range for <numeric expression> is as described below. Any value exceeding the
range results in an “Overflow” error.
Decimal number: -32768 ~ 0 ~ 65535
Hexadecimal number: &H8000 ~ 0 ~ &HFFFF
HEX$ (-n) is equal to HEX$ (65536-n).