Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

splitpathQQ of IFPORT

bmchenry
New Contributor II
585 Views
if a file name without a path is passed to the function SplitPathQQ it returns a number unrelated to path length
say we pass the function name='whatever.txt'
from manaul:
result = SPLITPATHQQ (path,drive,dir,name,ext)

The result type is INTEGER(4). The result is the length of dir.

and dir is (Output) Character*(*). Path of directories, including the trailing slash.


in a sample i am running i get 48 (which may be the path lengthto the workingdirectory for the debug session?
it should be zero

is result undefined if no path given? or the path to the 'working directory'?

thanks

Brian

0 Kudos
1 Reply
Steven_L_Intel1
Employee
585 Views
A quick experiment shows that if you specify a relative path, the result has the default of the current directory applied. It is not simply parsing what you supply - it gets the full path first and then parses that.

I agree that the documentation could be improved to note that incomplete paths are filled in.
0 Kudos
Reply