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 #3323] Tue, 13 December 1994 07:57 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
plutchak@lager.geo.brown.edu (Joel Plutchak) writes:

> In article <3chsab$d78@paperboy.gsfc.nasa.gov> thompson@orpheus.nascom.nasa.gov (William Thompson) writes:
>> 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.

> Yes, but neither of those seem to be sufficient. In my case (and I
> believe in the case of the original poster), we've got VAX floating
> point numbers to be read into IEEE format on a machine who's local
> format *is* IEEE. Unless I'm missing something in my reading of the
> manual, that's not covered by IDL's conversion functions.
> I've got some code lying around somewhere that I wrote to go from
> VAX to IEEE floating point (single-precision), which I'll dig up if
> I don't see any other solution go by before I get back from my travels.

There are also some routines to handle this in the IDL astronomy user's
library. In the "misc" subdirectory there are the routines CONV_VAX_UNIX and
CONV_UNIX_VAX. They're not as fast as those mentioned above, but they'll do
what you want. Depending on how the file was written (i.e. the VMS record
attributes), you may also need the routine CONV_VAX_BLOCK.

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: Thu Oct 09 06:51:06 PDT 2025

Total time taken to generate the page: 1.36161 seconds