[SciPy-user] reading binary files written by a gfortran code...

David Huard david.huard@gmail....
Mon Jun 16 09:17:32 CDT 2008


According to the Fortran95 handbook (1997) ACCESS arguments takes either
DIRECT or SEQUENTIAL as values.

Also, if the ACCESS specifier is DIRECT, a RECL specifier must be present.

RECL is an integer specifying the length of each record in default
characters if access is direct, or the maximum length of a record if the
access method is sequential.

HTH,

David

2008/6/15 fred <fredmfp@gmail.com>:

> Phil Austin a écrit :
> >
> > You want to write/read direct access files, which are just the bytes
> > without the compiler-specific recordlength information.  Here is
> > an example of a some tutorial code I wrote for myself exercising
> > memmap and a fortran direct-access read -- just replace read with
> > write in the fortran code to get output
> Thanks Phil.
>
> But I would rather prefer the "magic line" fortran code (if it exists)
> to write directly the binary file with the right format.
>
> For instance, as seen on the web,
>
> open(unit=20, file='foo.dat', form='unformatted', access='stream')
> does not work:
>
>  Fortran runtime error: Bad ACCESS parameter in OPEN statement
>
> In fact, I would like to know all access parameters for the open
> statement. Where could I get them ?
>
> I did not find relevant info, in gfortran manpage, gfortran info, etc.
>
>
> Cheers,
>
> --
> Fred
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20080616/2b99577b/attachment.html 


More information about the SciPy-user mailing list