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

file name from unit number

Dan__Calin
Beginner
196 Views

Hi,

Is there a way to obtain the file name associated to a unit number?

I tried:

inquire(unit=14, opened=openedq, file=name_of_file)

but I've got an error:

error #7934: An INQUIRE statement must contain only one FILE= specifier, one UNIT= specifier or one DIRECTORY= specifier. [FILE]

Is there another way to obtain the file name associated to an unit number?

Thanks,

Calin

0 Kudos
1 Solution
Steve_Lionel
Black Belt Retired Employee
197 Views

You want NAME=, not FILE=.

View solution in original post

2 Replies
Steve_Lionel
Black Belt Retired Employee
198 Views

You want NAME=, not FILE=.

Dan__Calin
Beginner
197 Views

Thanks Steve!

Calin

Reply