filelocation = "../"//filename
PRINT *, "Attempting to open ", TRIM(filename)
OPEN(fh1, FILE = filelocation, STATUS='old',IOSTAT = io)
Can anyone tell me please what is the meaning of "../"// in the first line?
filelocation = "../"//filename
PRINT *, "Attempting to open ", TRIM(filename)
OPEN(fh1, FILE = filelocation, STATUS='old',IOSTAT = io)
Can anyone tell me please what is the meaning of "../"// in the first line?
The string
../
is Linux for the parent directory of the current working directory. This may or may not work on a Windows machine. The two characters
//
represent the Fortran operator for string concatenation. So
"../"//filename
sets filelocation
to refer to a file named filename
in the parent directory of the directory the program thinks it is executing in.