Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

FINDFILEQQ

Portability Function: Searches for a specified file in the directories listed in the path contained in the environment variable.

Module

USE IFPORT

result = FINDFILEQQ (filename,varname,pathbuf)

filename

(Input) Character*(*). Name of the file to be found.

varname

(Input) Character*(*). Name of an environment variable containing the path to be searched.

pathbuf

(Output) Character*(*). Buffer to receive the full path of the file found.

Results

The result type is INTEGER(4). The result is the length of the string containing the full path of the found file returned in pathbuf, or 0 if no file is found.

Example

USE IFPORT
CHARACTER(256) pathname
INTEGER(4) pathlen
pathlen = FINDFILEQQ("libfmt.lib", "LIB", pathname)
WRITE (*,*) pathname
END