Is it possible to use list-directed reads to read a file path from a line, when the input may have a / in it? The application of this is to easily parse commands from an input file for my program.
An example problem which shows the behavior I don't want is:
program test
implicit none
character(len=100) :: line, label, fname
line="command file/path"
read(line, *) label, fname
print *, fname
end program test
This program will print file instead of printing file/path. The reason I need list directed output is because I would like to have users be able to provide optional commands after. Such a command input would be:
command file/path arg1 arg2
where the number of optional arguments is variable. If it's a matter of it just not being that easy to do then I'll implement some kind of tokenizing subroutine.
This is free form using the latest version of gfortran if that makes a difference; I'm not limited to any specific standard.