如下简单的程序:[Fortran] 纯文本查看 复制代码 program ggg
implicit none
integer a,b,d
a=3
b=4
call sub1(a,b,d)
write(*,*),d
stop
end program ggg
subroutine sub1(a,b,c)
integer a,b,c
c=a+b
return
end subroutine sub1
如果subroutine命名为"plus1"可以编译成功,但如果是"plus"或者"sub1"这样的名字会提示编译错误:
The number of actual arguments cannot be greater than the number of dummy arguments.
请问这是什么原因?
|