comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help: Byte-swapping program
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Help: Byte-swapping program [message #3331 is a reply to message #3328] Mon, 12 December 1994 08:04 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
grunes@news.nrl.navy.mil (Mitchell R Grunes) writes:

> In article <schaep-1212941334430001@130.60.16.90> schaep@rsl.geogr.unizh.ch (Michael E. Schaepman) writes:
>> Since we are moving our data from a VAX and a DecStation to Suns and Macs,
>> I am looking for a program, that converts big <> low-endian byte order and
>> IEEE <> VAX representation.

> In IDL or PV-Wave, the bytes of each element of array A can be swapped
> by
> BYTEORDER,A

> I think IEEE is more dificult.

The above statement is only correct if the array is short integers. For long
integers one should use the keyword /LSWAP.

I don't know about PV-Wave, but IDL does contain the options /XDRTOF and
/FTOXDR to convert between IEEE and the local host floating point
representation. Similarly, one can use /XDRTOD and /DTOXDR for double
precision.

The IDL astronomy user's library (anonymous ftp to idlastro.gsfc.nasa.gov)
routines IEEE_TO_HOST and HOST_TO_IEEE does the appropriate conversions for all
data types.

Bill Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Array variable in extended memory - IDL
Next Topic: Contour labels screwed up when using MAXVALUE

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:46:28 PDT 2025

Total time taken to generate the page: 1.28078 seconds