Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28499 Discussions

Reading and Modifying External Files

cloneboy
Beginner
183 Views
Hello!
I'm new to FORTRAN, and have an urgent problem I need solved. I have two external text files, and in these text files are data that I need to read and modify.
Inboth files, I have to locate the data to read. For the firstfile, the lines required are all preceded by a certain identifier, in the firstcase, "CQUAD4" and in the second, the data is written thus:
ID... ...MINOR SHEAR
1......6.16E+052.26E+05
where the data is the numerical values.How do I have FORTRAN search for these identifiers and lines, so that the data can be read?
The second issue is writing to the text file. FORTRAN has to modify a single line of data in the first file, placing a $ sign at the beginning of the line. I assume that a similar technique could be used as above.
Thanks to those who can provide any help, it will really be appreciated.
David vW
0 Kudos
0 Replies
Reply