Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

file name from unit number

Dan__Calin
Beginner
142 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
142 Views

You want NAME=, not FILE=.

View solution in original post

2 Replies
Steve_Lionel
Black Belt Retired Employee
143 Views

You want NAME=, not FILE=.

View solution in original post

Dan__Calin
Beginner
142 Views

Thanks Steve!

Calin

Reply