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

Home » Public Forums » archive » Re: Binary Output/Input From/To IDL on PC??????
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: Binary Output/Input From/To IDL on PC?????? [message #1970 is a reply to message #1964] Tue, 19 April 1994 18:13 Go to previous message
HADFIELD[1] is currently offline  HADFIELD[1]
Messages: 9
Registered: March 1994
Junior Member
In article <rlefevre.21.000AD756@tamu.edu> rlefevre@tamu.edu (Randy J. Lefevre) writes:

> I produce an array (145,73,10) in IDL. I open an output file (OPENW) and
> write out binary data (WRITEU). I try to read the binary output into MS
> Fortran PowerStation (on a PC). If I use a Fortran UNFORMATTED open, I get a
> wrong file type error in Fortran.

Not surprising. Fortran programs generally expect separator bytes at the
beginning or end of each record in an "UNFORMATTED" file. WRITEU in IDL
produces a "bare" format.

> If I use a PowerStation BINARY open, it
> works. However, only half the input array gets in, the other half is all 0s.

Is the number of bytes per array element the same in the IDL and PowerStation
programs? If you wrote IDL integer (2 byte) data and tried to read it
as Fortran INTEGER*4 data there would only be enough to fill the half the
array. (Most Fortran compilers default to a 4-byte form for integers.)

What machine is IDL running on? Does it have the same byte order
(little-endian) as the PC?



============================================================ ===========
Mark Hadfield hadfield@greta.niwa.cri.nz
NIWA Marine (Taihoro Nukurangi) NIWA.GRETA:HADFIELD
Wellington, New Zealand
[Message index]
 
Read Message
Read Message
Previous Topic: HDF routines
Next Topic: Plotting Color Strips - thermograms.

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

Current Time: Sun Oct 12 11:20:24 PDT 2025

Total time taken to generate the page: 1.22657 seconds