0

I have a Fortran code which reads a "dat" file as shown below:

open(unit=2,file="36_st_18.dat",form="formatted",status="old")

However, sometimes the file name changes ( e.g., x_24_st_42_b.dat). All file names have always 'st' latters in it. How can I generalize the reading in Fortran so that I dont have to change the file name each time. Thanks in advance.

Ian Bush
  • 6,996
  • 1
  • 21
  • 27
sfe
  • 19
  • 3

0 Answers0