くだすれFORTRAN(超初心者用)その3at TECH
くだすれFORTRAN(超初心者用)その3 - 暇つぶし2ch45:デフォルトの名無しさん
07/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でコンパイルして動いたそうなのですが・・・
コンパイルオプション等の指定で解決できると思うのですが,
何かアドバイス頂けませんでしょうか?


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch