作者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