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

Home » Public Forums » archive » 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 #2047 is a reply to message #1973] Tue, 26 April 1994 05:05 Go to previous messageGo to previous message
grunes is currently offline  grunes
Messages: 68
Registered: September 1993
Member
In article <1994Apr26.080731.17544@nenuphar.saclay.cea.fr> buteau@bali.saclay.cea.fr (A.Buteau 62 17) writes:
> From: buteau@bali.saclay.cea.fr (A.Buteau 62 17)
> Subject: Re: Binary Output/Input From/To IDL on PC??????
> Date: Tue, 26 Apr 1994 08:07:31 GMT
> Be very careful with the MS Fortran Unformatted Write.
> MS Fortran writes data with control blocks and this control blocks are not
> the same of other Fortran ( Sun Fortran for example) or Pv Wave.
>
> I had difficulties reading with Pv Wave data written by MS Fortran Unformatted Writes . The only solution I had was to carefully look in the MS manual how this Fortran writes data and control blocks and then with Pv Wave make a byte per byte read of the>data to discard the control blocks and to retrieve my data.
>
>

Ah, but under MS Fortran, one may read/write raw information (no control
blocks) with direct access statements, at least if the form is binary.
If you set the record length to 1, and increment the record # by the
number of bytes you have read or written, you will be OK. E.G.:

integer*4 i,j
open(1,file='filename',form='binary',access='direct',
& recl=1)
irec=1
read(1,rec=irec)i
irec=irec+4
read(1,rec=irec)j
...

As far as being the same as Sun Fortran, different brands of Fortran
for the Sun have produced different control blocks too.

On Sun Fortran, ordinary direct access opens:
open(1,file='filename',form='unformatted',access='direct',
& recl=1)
will read or write raw data.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Widget_list and Widget_slider questions
Next Topic: contour filling

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

Current Time: Fri Oct 10 11:01:29 PDT 2025

Total time taken to generate the page: 0.16555 seconds