[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 2chのread.cgiへ]
Update time : 01/23 11:34 / Filesize : 200 KB / Number-of Response : 550
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

くだすれFORTRAN(超初心者用)その3



45 名前:デフォルトの名無しさん mailto:sage [2007/12/20(木) 11:20:29 ]
人からもらった下のようなプログラムなのですが

program main
implicit none
integer :: dim, hoge
hoge = 1
dim = 1
call sub(hoge, dim)
end program main

subroutine sub(hoge, dim)
implicit none
integer :: dim
integer :: hoge(dim)
print *,"hoge = ", hoge(1)
end subroutine

Intel fortran コンパイラ 10.0でデフォルト設定でコンパイルすると下記のビルドエラーが出ます.

Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [HOGE]

プログラム作成者はCompaq Visual Fortran 6.6でコンパイルして動いたそうなのですが・・・
コンパイルオプション等の指定で解決できると思うのですが,
何かアドバイス頂けませんでしょうか?






[ 続きを読む ] / [ 携帯版 ]

全部読む 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<200KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef