HEX
 
Syntax


HEX ( expression )

Description


This returns the hexadecimal string representation of the INTEGER expression. Hexadecimal values contain 0-9, and A-F. The size of the result string depends on the integer type passed, it's not fixed.

This may also be used during debuging to change the default base to Hexadecimal, do this by typing just HEX on the line, opposite of DEC when used this way.

HEX is not defined for use with SINGLE types

Example

DIM text$(10)
  
text$ = HEX(4096) 
PRINT "0x";text$     ' will display 0x1000 
   

Differences from other BASICs

See also