fcode 发表于 2016-11-22 20:26 拜谢老大,谢谢老大,谢谢QQ群,也谢谢论坛。总能在这里寻求到好的答案,倍感温暖。 |
|
见下代码的 !// 注释 [Fortran] syntaxhighlighter_viewsource syntaxhighlighter_copycode program example
use ifport
implicit none
integer i
character(len=56) temp,name
integer istatus1,istatus2,istatus3,istatus4,istatus5
name='0.05'
istatus1=system("Md "//trim(name)) !建立文件夹
do i=1,5
write(temp,*) i
istatus2=CHDIR(trim(name)) !定位到上述建立的文件夹的路径
istatus3=system("Md "//trim(temp)) !在此路径上再建一层文件夹
istatus4=CHDIR(trim(temp)) !定位到新一层的文件夹
open(11,file='data')
write(11,*) i
istatus5=CHDIR("..")
close(11)
end do
read(*,*)
end program example
|
捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )
GMT+8, 2025-11-3 02:14