[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


HOST_TO_IEEE Source code in host_to_ieee.pro

HOST_TO_IEEE

Name
     HOST_TO_IEEE
Purpose
     Translate an IDL variable from host to IEEE representation
Explanation
     The variable is converted from the format used by the host architecture
     into IEEE-754 representation (as used, for example, in FITS data ).
     Duplicates most of the functionality of the SWAP_ENDIAN_INPLACE procedure
     introduced in V5.6, with the addition of the IDLTYPE keyword.
Calling Sequence
     HOST_TO_IEEE, data, [ IDLTYPE = ]
 INPUT-OUTPUT PARAMETERS:
     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
Keyword Parameters
     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).
Example
     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
Procedure
     The BYTEORDER procedure is called with the appropriate keywords
Revision 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

Last modified by pro2html on 2003 February 06 at 04:51 UTC

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

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