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

Home » Public Forums » archive » Re: VMS vs UNIX, unformatted binary files
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: VMS vs UNIX, unformatted binary files [message #3612 is a reply to message #3609] Wed, 15 February 1995 19:29 Go to previous messageGo to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <3ht8pb$qsj@due.uninett.no>, lars@rapid.fi.uib.no (Lars Soeraas) writes:
> We are trying to read unformatted binary files in IDL on a
> UNIX system (HP 9000, series 700). The files to be read have been
> generated by IDL on a VAX VMS. The problem is that the bytes are
> swapped and the files contain a mixture of lonint, int, floats
> and character strings. We have an idl program to read the files
> which works well on a VAX but returns garbage on the UNIX system.
> Is there a simple way of avoiding this problem?

You can swap the byte order in the "longs" and "ints" with BYTEORDER. However,
there are no built-in routines in IDL on the HP to convert VAX float to
IEEE float. The inverse routines do exist: you can convert VAX float to IEEE
float on tha VAX before writing the data to disk. Again, use the BYTEORDER
routine. If the data are only to be read by IDL the simplest thing to do
is SAVE, /XDR which saves the variables in the portable XDR format.
____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: skew T vs. Log p idl routine
Next Topic: How to learn IDL?

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

Current Time: Sun Oct 12 13:01:13 PDT 2025

Total time taken to generate the page: 0.48365 seconds