Xbasic

HEX_TO_DEC Function

Syntax

Decimal_Value as N = hex_to_dec(C hex_value [,C return_type ])

Arguments

hex_value

A hexadecimal value. Character

return_type

Character

Description

Converts a hexadecimal value to a decimal number.

Discussion

The HEX_TO_DEC() function returns the integer equivalent of a hexadecimal value.

Example

dim dnum as N
dim hnum as C
hnum = "D"
dnum = hex_to_dec(hnum)
? dnum ? 13.000000

See Also