Discodave
Joined: 18 Jun 2013 Posts: 1
|
Posted: Tue Jun 18, 2013 1:18 pm Post subject: Fortran Code Help |
|
|
Ok a big sorry I am very new to Fortran, but have been coding in C for many years.
I have some very old code that I am looking at (complied in Ftn95/Plato IDE). The code now complies fine, but when executed the code crashes on trying to open a file. The executable is launched from a batch file, eg:-
Test.bat (contains)
c:\code\Test.exe C:\data\data.dat
the executable launches from the command line and requires to read in the data file. However the code opens the file like this:-
OPEN(5, '')
Currently unsure how this data file path is being retrieved and unsure why it is trying to open the file without a string being present.
I have replaced the OPEN command with
OPEN(5, 'C:\data\data.dat')
and all works fine, but I do need the ability to read the path from the batch file. Any pointer would be great
Thanks for all your help  |
|