Fortran Fortran 90 Program for Processing Output Files | Looping Through File Names

  • Thread starter Thread starter jd1828
  • Start date Start date
  • Tags Tags
    Fortran
AI Thread Summary
The discussion centers on writing a Fortran 90 program to process output files named file.datA, file.datB, etc. The user aims to create a loop that modifies a variable named "file" to include the letters A-Z as suffixes for each iteration. A suggested solution involves defining a new character variable that concatenates the base filename with the appropriate suffix using the TRIM function to manage spaces. This approach allows for dynamic filename generation within the loop, facilitating the reading of each output file sequentially.
jd1828
Messages
43
Reaction score
0
Im trying to write a program in fortran 90 to process some output files that i have. Here is the problem I am having. All of the output files are named file.datA, file.datB,...ect. I set the variable "file" to equal file.dat. I want the program to run through a loop and each time change the name of "file". Basically I need to add A-Z on the end each time it reads the file.
 
Technology news on Phys.org
jd1828 said:
Im trying to write a program in fortran 90 to process some output files that i have. Here is the problem I am having. All of the output files are named file.datA, file.datB,...ect. I set the variable "file" to equal file.dat. I want the program to run through a loop and each time change the name of "file". Basically I need to add A-Z on the end each time it reads the file.

... wonder if you could do it simply by defining a new character variable by trimming (using TRIM and some "editing suffix" in between, like // to ditch spaces etc.) 2 other chars together, and using the new one in the loop as the filename.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
6
Views
3K
Replies
8
Views
2K
Replies
8
Views
4K
Replies
2
Views
2K
Replies
3
Views
3K
Replies
16
Views
4K
Replies
6
Views
3K
Replies
2
Views
1K
Replies
6
Views
2K
Back
Top