问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/17210015/meaning-of-filelocation-filename