PRINT HEXOF(
General Form:
The HEXOF( function prints the value of the alpha variable, literal string or string function in hexadecimal format. Trailing spaces (HEX(20)) are also printed. The HEXOF( function can only be used in conjunction with the PRINT statement. Multiple PRINT functions (AT(, BOX(, HEXOF(, TAB( ) can be incorporated any where in the PRINT statement, separated with semi-colons.
Inserting a minus sign before the alpha variable, literal string, or string function, causes the HEXOF( function to insert spaces between each pair of bytes.
Example:
DIM test$8
test$ = "ABCDEFG "
PRINT HEXOF(-test$)
4142 4344 4546 4720
Inserting a plus sign before the alpha variable, literal string or string function, causes the HEXOF function to print the ASCII equivalence on the right-hand side of the output. In this format 16 characters are printed on each line.
Example:
DIM test$8
test$ = "ABCDEFG "
PRINT HEXOF(+test$)
4142 4344 4546 4720 *ABCDEFG *
See also: