2

私はプログラミングを行うモデラーです...私は自分自身をプログラマーとは決して呼びませんが、C# と FORTRAN でプログラミングしています。dll を介していくつかの C# コードに接続した FORTRAN モデルがあります。変数を dll のメモリに保持するには、共通ブロックが必要であることがわかりました。また、複数の include ステートメントを使用できないこともわかりました...共通変数のインクルード ファイルはすべてラベル付けされていません。Chapman (2008) 「科学者とエンジニアのための FORTRAN 95/2003」では、「ラベルのない COMMON ステートメントは決して使用すべきではありません ...」と述べています。

共通ファイルに破損したメモリがないことを確認するにはどうすればよいですか? 実験はできると思いますが、これについて適切なアドバイスが欲しいと思っていました。Microsoft Visual Studio 2008 内で Lahey-F バージョン 7.2 を使用しています

誰でも、何か考えはありますか?

4

1 に答える 1

0

As a programmer who models what I'd like to know is exactly why Chapman states that the unlabelled COMMON should not be used. From what I can remember the blank / unnamed common block is global and must be defined in the main program.

The only way to be sure about this is probably to make a simple Fortan DLL and then disassemble it to see what it's done with / where it put the common block.

Also it'd be useful if you could paste examples of errors etc. when you try to use a named common. It may be that there is a better solution once we understand exactly what's not working.

于 2010-08-17T13:30:38.877 に答える