Aug 30, 2006 #1 fanta2 Technical User Apr 10, 2005 78 CA I want to open new files named from 1 to 100 e.g. 1.txt, 2.txt, ... I tried the following but no success...can any one help me plz.. do i=1, 100 open (i, File = '//i//.txt') code... close(i) end do
I want to open new files named from 1 to 100 e.g. 1.txt, 2.txt, ... I tried the following but no success...can any one help me plz.. do i=1, 100 open (i, File = '//i//.txt') code... close(i) end do
Aug 30, 2006 #2 xwb Programmer Jul 11, 2002 6,828 GB Code: character*7 str do i=1, 100 write (str, 100) i 100 format (I3,'.txt') open (i, File = ltrim (str)) code... close(i) end do Upvote 0 Downvote
Code: character*7 str do i=1, 100 write (str, 100) i 100 format (I3,'.txt') open (i, File = ltrim (str)) code... close(i) end do
Aug 30, 2006 Thread starter #3 fanta2 Technical User Apr 10, 2005 78 CA XWB ... I would like to thank you so much for the immediate, precise and perfect answer. It simply solved my problem... thanks! Upvote 0 Downvote
XWB ... I would like to thank you so much for the immediate, precise and perfect answer. It simply solved my problem... thanks!