>  Docs Center  >  Libraries  >  ASTROLIB  >  HOST_TO_IEEE






    Translate an IDL variable from host to IEEE representation


    The variable is converted from the format used by the host architecture
    into IEEE-754 representation ("big endian" as used, e.g., in FITS data ).
    Duplicates most of the functionality of the SWAP_ENDIAN_INPLACE procedure
    with the addition of the IDLTYPE keyword.

Calling Sequence

    HOST_TO_IEEE, data, [ IDLTYPE = ]
    data - any IDL variable, scalar or vector. It will be modified by
            HOST_TO_IEEE to convert from host to IEEE representation. Byte
            and string variables are returned by HOST_TO_IEEE unchanged

Optional Keyword Inputs

    IDLTYPE - scalar integer (1-15) specifying the IDL datatype according
              to the code given by the SIZE function. This keyword
              will usually be used when supplying a byte array that needs
              to be interpreted as another data type (e.g. FLOAT).


    Suppose FITARR is a 2880 element byte array to be converted to a FITS
    record and interpreted a FLOAT data.
      IDL> host_to_ieee, FITARR, IDLTYPE = 4


    The BYTEORDER procedure is called with the appropriate keywords

Modification History

      Adapted from CONV_UNIX_VAX, W. Landsman Hughes/STX January, 1992
      Version for IDL V5.0 August 1997
      Converted to IDL V5.0 W. Landsman September 1997
      Added new integer datatypes C. Markwardt/W. Landsman July 2000
      Use /SWAP_IF_LITTLE_ENDIAN keyword for 64bit types W. Landsman Feb 2003
      Do not use XDR keywords to BYTEORDER for much improved speed
                              W. Landsman April 2006

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