&h
From Xojo Documentation
Literal
Used to represent a hexadecimal literal.
Usage
&hHexNumber
Part | Type | Description |
---|---|---|
HexNumber | Hexadecimal number | A hexadecimal literal value. |
Notes
To write a hexadecimal literal, precede the value with &h.
Sample Code
Assign a number using a hex literal:
To get the numerical value (myValue) of a hexadecimal string (s):
Var myValue As Integer
myValue = Val("&h" + s)
// If s is "A4", myValue will contain the value 164 which corresponds to &hA4
myValue = Val("&h" + s)
// If s is "A4", myValue will contain the value 164 which corresponds to &hA4
See Also
Hex function.