write a series of file
write a series of file
(OP)
Hallo everybody,
I would like to write a series of file where they are different only for the name, like name_1, name_2,name_3 ecc...
what I'm doing is something like this:
do j=1:50
open(unit=2,access='sequential',file='name_'j'.inp',status='old')
end do
how can put the J in the name in order to have a list of file which name is:
name_1.inp
name_2.inp
name_3.inp
.
.
name_50.inp
thanks,
Albert
I would like to write a series of file where they are different only for the name, like name_1, name_2,name_3 ecc...
what I'm doing is something like this:
do j=1:50
open(unit=2,access='sequential',file='name_'j'.inp',status='old')
end do
how can put the J in the name in order to have a list of file which name is:
name_1.inp
name_2.inp
name_3.inp
.
.
name_50.inp
thanks,
Albert
RE: write a series of file
CODE
integer:: j
do j = 1, 50
write (filename, 10) j
10 format ('name', I0, '.inp')
open (unit=2, access='sequential', file=filename, status='old')
...
close (2)
enddo