FORTRAN 関数がサブルーチンとして呼び出されています。
サブルーチン型の FORTRAN 仮引数を呼び出したときにも、同じ種類のエラーが発生することがあります。つまり、仮引数を使用して呼び出されるサブルーチンで、直接呼び出した場合と同じ問題が発生することがあります。この問題が発生するかどうかは、サブルーチン型の仮引数に渡されるサブルーチンに依存します。この問題が発生した場合は、サブルーチン引数が渡された呼び出し位置を特定する問題箇所もレポートされます。
ID |
問題箇所 |
説明 |
---|---|---|
1 |
呼び出し位置 |
関数が呼び出された場所 |
subroutine IAmASubroutine(i) integer :: i i = 5 end real function IAmAFunction(i) integer :: i read *,i IAmAFunction = 3.14 + i end subroutine ICallMyArg(sub) external :: sub call sub(j) ! actual function "IAmAFunction" is called as subroutine print *,j end external :: ICallMyArg,IAmASubroutine,IAmAFunction integer :: k call ICallMyArg(IAmAProcedure) call ICallMyArg(IAmAFunction) ! IAmAFunction is called as a subroutine call IAmAFunction(k) end
© 2010 Intel Corporation. 無断での引用、転載を禁じます。