Table of Contents

Advertisement

HEX$
Function:
(Argument)
Numeric
expression
6-6 Others
®
Converts a given decimal argument to a 4-digit hexadecimal character
string.
Parameter:
Argument:
Numeric expression
-
32769
<
numeric expression<
65536
Explanation:
1) Converts a decimal given as a numeric expression to a 4-digit hexadecimal
character string.
2) The
value of
a
numeric expression given as the argument
is
handled as an
integer
with
decimals discarded
.
3) When the value of an
argument exceeds 32768, it will
be handled as the
value
after subtracting 65536.
<Example>
40000
will
be handled
as
follows.
40000
-
65536
=
-
25536
Example:
HEX$( 10000 )8
HEX$( 65535 l
8
HEX$(-1)
8
10
INPUT"X='',X
20 PRINT
"X=&H•;HEX$(X)
30 GOTO
10
163

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents