Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29284 Discussions

Reading and Modifying External Files

cloneboy
Beginner
337 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