- #1
Jahir
- 2
- 0
Hi all,
Thanks in advance!
I'm almost new in Fortran, and I'm having some troubles with a Fortran program. I've some input data files named with numerical values like
"Input_A=0.00_B=0.00"
"Input_A=0.10_B=0.01"
"Input_A=0.20_B=0.02"
"Input_A=0.30_B=0.03"
"Input_A=0.40_B=0.04"
...
..
"Input_A=..._B=..."
I've to read this within a do loop and have some calculations and make similar output files. I can read and write the files if and only the sequence has no break. If anyone file is missing in between, the do loop terminates rather to proceed to take the next as input.
The program is somewhat like this:
do A=0.0,1.0,0.1
do B=0.00,0.5,0.01
.
.
.
open (1, file =...)
do i=1,n
read(1,*) x(i), y(i)
end do
.
.
.
.
end do
end do
I want to make the program to proceed to the next iterations, skipping the missing files and to the end of the steps. Can you guys please help me out? Thanks again.
Thanks in advance!
I'm almost new in Fortran, and I'm having some troubles with a Fortran program. I've some input data files named with numerical values like
"Input_A=0.00_B=0.00"
"Input_A=0.10_B=0.01"
"Input_A=0.20_B=0.02"
"Input_A=0.30_B=0.03"
"Input_A=0.40_B=0.04"
...
..
"Input_A=..._B=..."
I've to read this within a do loop and have some calculations and make similar output files. I can read and write the files if and only the sequence has no break. If anyone file is missing in between, the do loop terminates rather to proceed to take the next as input.
The program is somewhat like this:
do A=0.0,1.0,0.1
do B=0.00,0.5,0.01
.
.
.
open (1, file =...)
do i=1,n
read(1,*) x(i), y(i)
end do
.
.
.
.
end do
end do
I want to make the program to proceed to the next iterations, skipping the missing files and to the end of the steps. Can you guys please help me out? Thanks again.