Inconsitancies with 'INQUIRE'
Philippe Schaffnit
P.Schaffnit@access.rwth-aachen.de
Tue Oct 24 15:08:00 GMT 2006
Hi!
Well, I would have expected the behaviour you report for ifort, hence my
(failed) attempt at reporting that, but I cannot claim to fully
understand the standard...
Thanks a lot!
Philippe
Tobias Burnus wrote:
>
> Hi,
>
> Tobias Burnus schrieb:
> > As said, I only found problems with formatted (filled as bug 29578):
> > The formatted check returns always "YES" unless the file does not exists
> > ("UNKNOWN"). This is specially true for:
> > - if the file is unformatted (even if it is still open, that check
> > should be trivial) or
> > - if the file is not readable.
> > In the first case it should be "YES" (at least if opened) or "UNKNOWN"
> > (but not if opened),
> > in the second case it should be "UNKNOWN".
> >
>
> I'm actually not any more sure what is meant by "formatted" in
> inquire(). The Fortran 2003 standard says:
>
> "The scalar-default-char-variable in the FORMATTED= specifier is
> assigned the value YES if FORMATTED is included in the set of allowed
> forms for the file, NO if FORMATTED is not included in the set of
> allowed forms for the file, and UNKNOWN if the processor is unable to
> determine whether or not FORMATTED is included in the set of allowed
> forms for the file."
>
> What makes an UNFORMATTED file allowed for FORMATTED access?
>
> Currently, the check is (libgfortran/io/unix.c; inquire_formatted):
>
> Empty string/file does not exist: "UNKNOWN"
> Directory: "NO"
> Regular file, block device, character device, pipe: "YES".
>
> Is "YES" what one would expect for a binary file? Ifort writes "NO" if
> one has open()ed an unformatted file [and simply "UNKNOWN" otherwise].
>
> Tobias
More information about the Fortran
mailing list