ASSOC function [message #6576] |
Thu, 11 July 1996 00:00 |
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
|
|
|