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 #3613 is a reply to message #3612] Wed, 15 February 1995 15:09 Go to previous message
chase is currently offline  chase
Messages: 62
Registered: May 1993
Member
>>>> > "Lars" == Lars Soeraas <lars@rapid.fi.uib.no> writes:
In article <3ht8pb$qsj@due.uninett.no> lars@rapid.fi.uib.no (Lars Soeraas) writes:

Lars> We are trying to read unformatted binary files in IDL on a
Lars> UNIX system (HP 9000, series 700). The files to be read have been
Lars> generated by IDL on a VAX VMS. The problem is that the bytes are
Lars> swapped and the files contain a mixture of lonint, int, floats
Lars> and character strings. We have an idl program to read the files
Lars> which works well on a VAX but returns garbage on the UNIX system.
Lars> Is there a simple way of avoiding this problem?


Use XDR format. This format is portable among versions of IDL running
on different machines. This is a special portable binary format that can be
read by other programs (e.g., C and PASCAL) on machines that have the
XDR library. See Chapter 17 of the IDL User Guide.

To use the XDR format, just add the /XDR keyword to your open
statements in IDL. It is that easy.

If you want to create XDR files with other programs for IDL to read,
there is an example in the User Guide. It is C program that creates
an XDR data file which is then easily read into IDL.

Chris
--
===============================
Bldg 24-E188
The Applied Physics Laboratory
The Johns Hopkins University
Laurel, MD 20723-6099
(301)953-6000 x8529
chris.chase@jhuapl.edu
[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: Sat Oct 11 19:08:30 PDT 2025

Total time taken to generate the page: 0.88052 seconds