作者ted40905 (天兵)
看板Fortran
标题[问题] module里面不同的function可以互相支援吗
时间Fri Nov 30 02:34:33 2012
用的是fortran90:
module example
contains
function A(x)
real::A
real,intent(in)::x
ooxxooxx...
A=ooxx
end function
!------------------------------
function B(x)
real::B,A
real,intent(in)::x
ooxxooxx...
B=ooxx*A(x)
end function
!------------------------------
end module
我是这样写,compile也过了,不过在主程式用到B的时候出现了runtime error
所以我在想同一个module底下的function是不是不能互相支援。
有请各位大大解惑~
--
BED ▎●▅ ▅
▎●▁▁
▎●▅▅▅
▎●▅▅
┌ ▎ ┐
▇▇▇ ▇ ▇▇▇▇ ▇▇▇▇ ●▅▅
▇▇▇▇ │ ▇▇▇▇ │
&
▎ ▎ ▎ ▎ ▎ ▎ ▎●▅▅
│ ▎ ▎│
▇▇▇▇ │ │
I magician super model basketball homeless prisoner
└ engineer
┘
player
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.45.204.145
1F:→ gilocustom:试试在函式B里宣告A时替A多加一个属性"external"。 11/30 03:04
※ 编辑: ted40905 来自: 140.112.22.252 (11/30 18:48)
2F:→ ted40905:好的我试试看,感谢你 11/30 18:49