[gfortran] patch inquire statement on open direct access file
Paul Brook
paul@codesourcery.com
Thu Dec 2 00:07:00 GMT 2004
On Tuesday 30 November 2004 12:37, Bud Davis wrote:
> 2004-12-1 Bud Davis <bdavis9659@comcast.net>
>
> * io/inquire.c (inquire_via_unit): do not allow a direct access
> file to be opened for sequential I/O.
Ok with a few changes.
> ! check to see that you cannot open a direct access file
> ! for sequential i/o.
> ! derived from NIST test fm910.for
> CHARACTER*10 D4VK,CDIR
> CDIR = 'TEMPFILE'
> OPEN(FILE=CDIR, UNIT=7, ACCESS='DIRECT',RECL=132)
Use status='scratch' rather than an explicit filename.
> INQUIRE(UNIT=7,SEQUENTIAL=D4VK)
> CLOSE(UNIT=7,STATUS='DELETE')
> PRINT*,D4VK
Check for expected value and call abort if it's wrong.
> END
<...>
> ! // disallow an open direct access file to be accessed
> ! // sequentially
Use C /* */ comments, not C++ //
Paul
More information about the Fortran
mailing list