[Prev][Next][Index]
fortran95 のインストール
fortran は、数値計算を目的として開発されたプログラミング言語です。
- 現在、3 種類の fortran(f77、g77、gfortran)がインストールされています。
使用目的に合わせてご利用下さい。
- f77 と g77 (Fortran90/95 の規格の一部も取り入れられている) は、従来の Fortran77 仕様
のコンパイラです。> は、プロンプトを表します。入力する必要はありません。ソースファイル
の拡張子は、f を指定して下さい。Fortran77 形式のソースとして認識されます。
- コンパイル( ソースファイル test.f、実行ファイル out )
>f77 -o out test.f
>g77 -o out test.f
- 実行
>./out
- gfortran は、フリーな fortran95 対応のコンパイラです。ソースファイルの拡張子
は、f95 を指定して下さい。Fortran95 形式のソースとして認識されます。
>gfortran -o out test.f95
- gfortran のバージョンは、以下のコマンドで確認できます。
> gfortran --version
GNU Fortran 95 (GCC) 4.3.0 20061202 (experimental)
Copyright (C) 2006 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING