From Xojo Documentation


Used to represent a hexadecimal literal.



Part Type Description
HexNumber Hexadecimal number A hexadecimal literal value.


To write a hexadecimal literal, precede the value with &h.

Sample Code

Assign a number using a hex literal:

Dim hex As Integer
hex = &hff // hex = 255 as a decimal integer

To get the numerical value (myValue) of a hexadecimal string (s):

Dim myValue As Integer
myValue = Val("&h" + s)
// If s is "A4", myValue will contain the value 164 which corresponds to &hA4

See Also

Hex function.