integer :: i
character*80 :: filename
do i=1,10
write(filename,FMT='(I6.6,A4)') i,".txt"
filename=trim(filename)
open(1,file=filename,status="unknown")
write(1,*)i
close(1)
end do
有赖幽趣 发表于 2014-4-3 18:17
[mw_shl_code=fortran,true]integer :: i
character*80 :: filename
岸边的鱼 发表于 2014-4-11 22:15
这个问题记得在群里有人问过,没想到他又到这里来问了,最没想到的是居然可以解决,我也一直想要有这么个功 ...
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |