Too many arguments in call to 'system' at (1)
http://bbs.fcode.cn/data/attachment/forum/202204/07/180905khmcofg2o4z9299c.png跑老师给的以前编好的程序,build还出了问题。
这个second子程序,定义的时候就有13个参数吖,为什么还报错了。
本帖最后由 风平老涡 于 2022-11-5 21:09 编辑
在调用程序中有些变量没有定义,需查看定义部分。 实型类型不一致,有的是双精度,有的单精度。 SECOND是系统函数,用来获得程序已运行的时间。你需要绕过这个函数。
把自定义的SECOND函数用module封装起来,或者自己写相应接口
program P
use test
implicit none
integer a,b
a=2
call second(a,b)
print *,b
end program P
module test
implicit none
contains
subroutine second(arg1,arg2)
integer, intent(in) :: arg1
integer, intent(out) ::arg2
arg2=arg1
end subroutine second
end module test
以上是一个module的样例
页:
[1]