The two attached .f95 scripts are identical, except for the data file which is read-in. I would really love it if someone could tell me why the 'ifinal.f95' scripts fails to produce results..?
That will be hard if you don't say anything about the kind of failure you get.
As you count he amount of lines to be read, check your second input file for lines that are being counted without having data, like a line with "<space><CR>
Maybe fail was the wrong word.. Both scripts run without crashing. However, once the 'ifinal.f95' script is finished, the results are all zero (incorrect). Strange, since I've only altered the data file name.
When the sources are the same and the input file is the same then it's logical that your error has nothing to do with Fortran.
You got an error in the ifinal.f95, because you try to use this file path which contains spaces:
'c:\documents and settings\owner\desktop\data\tdata.txt'
in the first example cleaner2.f95 you used normal file path without spaces:
'c:\perl\scripts\496\rescraped_trend_space.txt'
and therefore it worked.
So, to avoid such problems try to use normal paths without spaces or try to anclose names with spaces in "...", e.g.
c:\"documents and settings"\owner\desktop\data\tdata.txt
I'm not sure if it works in Fortran, because I try to avoid using long path names with spaces.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.