Fortran は、C 言語の開発前から存在する言語で、 大型計算機のプログラムはこれで書かれている割合が高いという調査もある。
ファイル名は本学の環境では example.f とし、
program example
implicit none
integer i, total
total = 0
do i = 0,9
total = total + i
end do
write(*,*) total
end program
実行は Kterm で gfortran example.f とし、できあがったバイナリファイル ./a.out を実行して調べる。
Fortran 77 から規格が変更され、 近年の言語で便利な機能を取り入れるようになった。