Verbs and Built-in Functions › &HEX
&HEX
Returns the hexadecimal equivalent of a decimal number.
&HEX decimalnumber
&HEX provides a means of converting a decimal number to its hexadecimal equivalent. &HEX is a built-in function and must be used to the right of an assignment statement.
Operands:
Examples: &HEX
&NUM = &HEX 66635 -* &NUM is set to FFFF
&A = &HEX &1
&NUM = &HEX 00123 -* &NUM is set to 7B
&NUM = &HEX -2088976 -* &NUM is set to FFE01FF0
Notes:
- The maximum decimal value that is processed is 2147483647 (2,147,483,647), which returns the value 7FFFFFFF. The minimum decimal value that is processed is -2147483648 (-2,147,483,648), which returns the value 80000000.
- Up to 15 digits (maximum), is accepted. That is, 000002147483647 is valid.
- An invalid decimal value, or one too large, results in a procedure error.
Copyright © 2009 CA.
All rights reserved.