[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


TO_HEX Source code in to_hex.pro

TO_HEX

Name
       TO_HEX
Purpose
       Translate a non-negative decimal integer to a hexadecimal string
Calling Sequence
       HEX = TO_HEX( D, [ NCHAR ] )
Input Parameters
       D - non-negative decimal integer, scalar or vector.  If input as a
           string, (e.g. '32') then all leading blanks are removed.
Optional Input Parameters
       NCHAR - number of characters in the output hexadecimal string.
               If not supplied, then the hex string will contain no
               leading zeros.
Output Parameters
       HEX - hexadecimal translation of input integer, string
Example
       IDL> A = TO_HEX([11,16])    ==>   A = ['B','10']
       IDL> A = TO_HEX(100,3) ==>   A = '064'
Procedure
       The hexadecimal format code '(Z)' is used to convert.  No parameter
       checking is done.
Procedures Used
       FSTRING() -- needed prior to V5.4 if formatting more than 1024 values
Revision History
       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

Last modified by pro2html on 2003 January 05 at 04:53 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically