Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28593 Discussions

Inquire (file=filename, EXIST=value)

paffe
Beginner
1,354 Views

Existing directories are not recognized by the FORTRAN-INQUIRE-Statement using the so called file inquiry. The returned value of the EXIST specifier is always ".false.", even if the directory exists. According to the description the output value should be ".true.".

Other Compilers and History:

All other F77/F90 compilers in use - and all Fortran Compilers before - on the other platforms return the value ".true." - according to the f95 standard. Besides:pgf90 Portland Compiler on Linux returns also ".true.". Andalso the father of the Intel ifort compiler on WindowsXP (Digital- COMPAQ) returns the value ".true.".

That is the truth. The standard document for INQUIRE EXIST specifier tells about files in total nothing about limitation to regular files.

The hint of Steve to ifort 9 release notes: we think that it is no solution to fuse some new incompatible specifiers (DIRECTORY and DIRSPEC) to the INQUIRE statement. We ask you and intel to satisfy the meaning of the standard for in this point and to make a cahnge according to the remark oftwlaub from 2006-01-11

0 Kudos
1 Reply
Steven_L_Intel1
Employee
1,354 Views
Sorry, no. We made our decision after careful research. This has been discussed in comp.lang.fortran as well, with standards committee members agreeing that the wording of the standard discourages such an implementation. CVF's behavior here was accidental and the subject of numerous complaints.

What it comes down to is - if you can't OPEN it, then INQUIRE by FILE should not say it exists.
0 Kudos
Reply