Xbasic

DEC_TO_HEX Function

Syntax

Hex_Value as C = dec_to_hex(N decimal_value [,L pad ])

Arguments

decimal_value

An integer value. Numeric

pad

Logical

Description

Converts a decimal value to hexadecimal.

Discussion

The DEC_TO_HEX() function returns the hexadecimal equivalent of a decimal number.

Example

dim dnum as N
dim hnum as C
dnum = 12
hnum = dec_to_hex(dnum)
? hnum ? "C"

See Also