![]() |
Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
![]() |
IEEE_TO_HOST
Translate an IDL variable from IEEE-754 to host representation
The variable is translated from IEEE-754 (as used, for
example, in FITS data ), into the host machine architecture.
Duplicates most of the functionality of the SWAP_ENDIAN_INPLACE procedure
introduced in V5.6, with the addition of the IDLTYPE keyword.
IEEE_TO_HOST, data, [ IDLTYPE = , ]
INPUT-OUTPUT PARAMETERS:
data - any IDL variable, scalar or vector. It will be modified by
IEEE_TO_HOST to convert from IEEE to host representation. Byte
and string variables are returned by IEEE_TO_HOST unchanged
IDLTYPE - scalar integer (1-15) specifying the IDL datatype according
to the code given by the SIZE function. This keyword
is usually when DATA is a byte array to be interpreted as
another datatype (e.g. FLOAT).
A 2880 byte array (named FITARR) from a FITS record is to be
interpreted as floating and converted to the host representaton:
IDL> IEEE_TO_HOST, fitarr, IDLTYPE = 4
The BYTEORDER procedure is called with the appropriate keyword
Written, W. Landsman Hughes/STX May, 1992
Converted to IDL V5.0 W. Landsman September 1997
Under VMS check for IEEE -0.0 values January 1998
VMS now handle -0.0 values under IDL V5.1 July 1998
Added new integer datatypes C. Markwardt/W. Landsman July 2000
Post-V5.1 version, no VMS negative zero check W. Landsman July 2001
Use size(/type) W. Landsman December 2002
Use /SWAP_IF_LITTLE_ENDIAN keyword for 64bit types W. Landsman Feb 2003
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]