[SciPy-user] reading binary files written by a gfortran code...
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.
2008/6/15 fred <email@example.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.
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user