Topic group Related topics
Returns the hexadecimal equivalent of a specified number, as a character string.
ITOH(<int expN> [, <chars expN>])
The 32-bit integer whose hexadecimal equivalent to return.
The minimum number of characters to include in the returned hexadecimal character string.
Use ITOH( ) to convert a number to a character string representing its hexadecimal equivalent. The hexadecimal number may be used for display and editing/input purposes. To use the hexadecimal number as a number, it must be converted back into a numeric value with HTOI( ).
By default, ITOH( ) uses only as many characters as necessary to represent <int expN> in hexadecimal. If <chars expN> is greater than the number of characters required, ITOH( ) pads the returned string with leading 0's to make it <chars expN> characters long. If <chars expN> is less than the number of characters required, it is ignored. For example, ITOH(21) returns the string "15", while ITOH(21,4) returns "0015".
Because ITOH( ) treats the integer as a 32-bit integer, negative integers are always converted into 8 hexadecimal digits. For example, ITOH(-1) returns "FFFFFFFF".