以文本方式查看主题

-  Fortran中文网  (http://fortran.cn/bbs/index.asp)
--  Fortran语言开发经验交流  (http://fortran.cn/bbs/list.asp?boardid=3)
----  [求助]求高手指教  (http://fortran.cn/bbs/dispbbs.asp?boardid=3&id=2749)

--  作者:23zhanlong
--  发布时间:2012/6/18 19:49:08

--  [求助]求高手指教
已经编写一个程序,其中有一个包含子程序的模块:

module zichengxu  

implicit none

contains

subroutine sub_spn(ln,d,spn)

implicit none

real ln,d,spn

real R

R=(ln/d)**2+1.0/4.0

spn=(ln/d*sqrt(R**2-(ln/d)**2)+R**2*asin(ln/d/R)-&

2.0*(ln/d)*(R-1.0/2.0))*d**2

end subroutine

subroutine sub_vbn(ln,d,vbn)  

implicit none

real ln,d,vbn,R,spn

real,parameter::pi=3.14

R=(ln/d)**2+1.0/4.0

call sub_spn(ln,d,spn)      

vbn=(pi*(2.0/3.0*(ln/d)**3-spn/d**2*(R-1.0/2.0)))*d**3

end subroutine

subroutine sub_xcn(ln,d,xcn)  

implicit none

real ln,d,xcn,R,spn

R=(ln/d)**2+1.0/4.0

call sub_spn(ln,d,spn)      

xcn=(ln/d-(2.0/3.0*(R**3-(R**2-(ln/d)**2)**(3.0/2.0))-&

(ln/d)**2*(R-1.0/2.0))*d**2/spn)*d

end subroutine

subroutine sub_ssn(ln,d,ssn)

implicit none

real ln,d,R,ssn

real,parameter::pi=3.14

R=(ln/d)**2+1.0/4.0

ssn=(2.0*pi*R*((R-0.5)*asin(-ln/d/R)+ln/d))*d**2

end subroutine

end module

在主程序中,开始use zichengxu 后面调用子程序call sub_spn(ln,d,spn)

编译时没有错误,在运行时出错得不到结果,不知错在哪,求高手指教;另外如何查看运行中的错误???


--  作者:大胆想
--  发布时间:2012/6/19 19:14:22

--  
给出了什么错误信息?
--  作者:大胆想
--  发布时间:2012/6/19 19:14:48

--  
给出了什么错误信息?
--  作者:23zhanlong
--  发布时间:2012/6/20 9:16:23

--  

问题已经解决了,谢谢各位啦


京ICP备05056801号