请教大家,我建了一个文档,里面设置了参数,a和b,希望输出,a+b的结果,但是运行出错,问题出在哪里了呢?
[Fortran] syntaxhighlighter_viewsource syntaxhighlighter_copycode program hello
implicit none
integer(kind=4) :: a,b
namelist /legend/ a,b
a=0
b=0
open(10,file="test01.txt",status="replace")
read(10,nml=legend)
write(*,*) a+b
end program
文档的内容如下
&legend
a=1
b=2
|