一个已存在的文件,用如下语句续写,出现错误
[Fortran] 纯文本查看 复制代码 program main
implicit none
open(1,file='test.txt',status='old',access='append')
write(1,*),1.0
close(unit=1)
end
错误如下
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 ffffffff
结果文件未被改变
如果把语句改成
[Fortran] 纯文本查看 复制代码 program main
implicit none
open(1,file='test.txt',status='new')
write(1,*),1.0
close(1)
end
错误和结果同上
求助~~
|