Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  TO_HEX

TO_HEX

TO_HEX

Name


      TO_HEX

Purpose


      Translate a non-negative decimal integer to a hexadecimal string

Calling Sequence


      HEX = TO_HEX( D, [ NCHAR ] )

Inputs


      D - non-negative decimal integer, scalar or vector. If input as a
          string, (e.g. '32') then all leading blanks are removed.

Optional Input


      NCHAR - number of characters in the output hexadecimal string.
              If not supplied, then the hex string will contain no
              leading zeros.

Output


      HEX - hexadecimal translation of input integer, string

Examples


      IDL> A = TO_HEX([11,16]) ==> A = ['B','10']
      IDL> A = TO_HEX(100,3) ==> A = '064'

Method


      The hexadecimal format code '(Z)' is used to convert. No parameter
      checking is done.

Procedures Called


      None.

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
      Assume since V5.4, omit FSTRING() call April 2006



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us