I have these files: D1.txt, D2.txt, D3.txt ..... D10.txt
My program is:
! Variables
integer i
character f(10)
! Body of Ej
data f/'1','2','3','4','5','6','7','8','9','10'/
Do i=1,10
open (i,file='D'//f(i)//'.txt')
My problem is when arriving to open D10.txt. I think there is a mistake...
I want to do something like
N=100
Do i=1,N
open (5, file='data'N'.txt')
enddo
but I know this is not correct
Can someone tell me how to do it?
I have been searching it for weeks but I am not able to find it.
Sorry for my english
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.