User account creation filtered due to spam.
We currently don't have any documentation for the INQUIRE statement; it should not be put into the Intrinsic Procedures chapter as it is not an intrinsic procedure. Maybe create a "File Operation I/O Statements" chapter?
Inquire should be straight forward (with the problem between Fortran 95 and Fortran 2003; the latter allows at least for all arguments now all kinds rather than only the default kind).
Most important is to document the UNFORMATTED and the FORMATTED specifier.
Their use is to return whether a file is unformatted or formatted, but this is in practice impossible to tell reliably. (This should be made clear in the documentation.) - possible values UNKNOWN, YES, NO. Returning always "UNKNOWN" would be the most correct answer ;-)
Implementation choice of gfortran for both formatted/unformatted:
- UNIT of unconnected file (and only preconnected files?) and file name="": UNKNOWN
- Filename of existing file (and connected files, queried via UNIT):
YES - if it is a file (regular, block/character device, named pipe)
NO - if it is a directory
UNKNOWN - otherwise
Other compilers have often:
- UNKNOWN - for unconnected files
- YES - for UNFORMATTED, if connected as UNFORMATTED
- NO - for FORMATTED if connected as UNFORMATTED
(and the last two vice versa if connected as FORMATTED)
Most people using FORMATTED or UNFORMATTED actually want to use FORM, values:
- UNDEFINED for unconnected files
- FORMATTED for as formatted opened files
- UNFORMATTED for as unformatted opened files
A quick look at the IBM Fortran manual on this states that the (un)formatted= specifier indicates whether or not a file may be connected or not as an (un)formatted file. The wording appears clearer than the Fortran standards.
Not intending to copy that particular wording, but this does need some word engineering and probably some review by some of our experts. I think the particular implementation in gfortran is OK.
There is a similar case with STREAM=
Adding to my list