Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
TO_HEX
Translate a non-negative decimal integer to a hexadecimal string
HEX = TO_HEX( D, [ NCHAR ] )
D - non-negative decimal integer, scalar or vector. If input as a string, (e.g. '32') then all leading blanks are removed.
NCHAR - number of characters in the output hexadecimal string. If not supplied, then the hex string will contain no leading zeros.
HEX - hexadecimal translation of input integer, string
IDL> A = TO_HEX([11,16]) ==> A = ['B','10'] IDL> A = TO_HEX(100,3) ==> A = '064'
The hexadecimal format code '(Z)' is used to convert. No parameter checking is done.
FSTRING() -- needed prior to V5.4 if formatting more than 1024 values
Written W. Landsman November, 1990 Converted to IDL V5.0 W. Landsman September 1997 Use FSTRING() for more than 1024 values March 2000 No FSTRING call needed if V5.4 or later September 2002
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]