In sanScript, tiny integer, integer and long integer values can be represented in hexadecimal form. To indicate a hexadecimal value, use one of the following forms:
&hnnnnnnnnn
0xnnnnnnnnn
In these representations, n is a hexadecimal digit (0 to 9, A to F). The first form is used by Visual Basic. The second form is standard in C. The following example shows how to use the hexadecimal representation.
int_value = &hFF;
You can convert values between the hexadecimal representation and the decimal equivalent. The hex() function returns a string containing the hexadecimal equivalent of an integral value. The value() function can be used to return the integral equivalent of a string containing a hexadecimal value.