read binary file

Jef Andrade geojaca at bol.com.br
Tue Jan 8 17:24:33 PST 2008


Hi,
I am passing of FORTRAN for D, but I have problem to read (access direct)
binary file.
In FORTRAN I make:

real*4 x,wl,alfa //declaration real numbers
OPEN(UNIT=10,FILE="file.ad",form='unformatted',access='direct',recl=len,STATUS='UNKNOWN')
//open binary file
read(10,*) x, wl, alfa //reading the numbers of file binary

Or I can read everything that will be inside of file:

do j=1,nt
    read(10,*) x(j) //vector
enddo

Can you help me please?
Regards


More information about the Digitalmars-d-learn mailing list