HexVal

Convert a character to it's hexadecimal value.

Syntax: val,err = HexVal(char)

val

The value of the character

err

0 The value is ok
1 char was an invalid hexadecimal character

char

The character to convert

Example:

Dim v as uByte, e as uByte

v,e = HexVal("2")   ' v=2  e=0
v,e = HexVal("b")   ' v=11 e=0
v,e = HexVal("A")   ' v=10 e=0
v,e = HexVal("X")   ' v=0  e=1
Also See: