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

Home » Public Forums » archive » ASSOC function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
ASSOC function [message #6576] Thu, 11 July 1996 00:00
Godelieve Deblonde &a is currently offline  Godelieve Deblonde &a
Messages: 2
Registered: February 1996
Junior Member
Hello,

I have written a binary file using fortran code:
parameter(ndim=10)
read rout(ndim,ndim)
open(1,file=filename,form='unformatted',status='unknown')
do i=1,ndim
do j=1,ndim
rout(i,j)=2.0
enddo
enddo
write(1) rout
write(1) rout
stop
end
I have executed this code on a SGI machine (IRIX5).

I would like to read this binary file using the IDL assoc function but
I have not had any success so far.
Here is the idl code that I use:
openu,10, filename
d=assoc(10, fltarr(10,10))
print, d(0)
print,d(1)
return
end

Some of the numbers are read in correctly, but some strange numbers appear
also. I have also added the keyword f77_unformatted but it still did not work.

On a HP, I have managed to read the binary file using a direct access mode for
the fortran open statement. This does not work on an SGI machine though.
Has anybody out there tried this before? I am quite sure that somebody
must have run into this problem. I don't think that RSI will be of much help
answering this question, they don't have a fortran compiler on an SGI! So they
told me.

Thanks,
Godelieve
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Over 256 colors ???
Next Topic: Re: IDL CONTOUR source?

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

Current Time: Wed Oct 08 15:54:17 PDT 2025

Total time taken to generate the page: 0.00520 seconds