syntax=""" C 行頭文字がCの場合はコメント ! !の後はコメント # ファイルのinclude include "hogehoge.f" C 変数宣言 implicit integer(i-n) implicit real*8(f) real*8 d real*8 :: d double precision :: d complex :: z complex*16 :: z double compolex :: z logical :: b character*60 :: str 配列 double precision :: a(1:5) double precision :: a(5, 5) 代入 z = (2.0d0, 1.0d0) C べき乗演算 ** C サブルーチン、関数 subroutine sub(a) double a ... end subroutine sub call sub(a) integer function func(i) integer i ... func = 3.0 end function 引数に対してのオプション integer,option :: i ! 省略可能(オプショナル)引数 integer,intent(in):: i ! 入力引数 integer,intent(out):: i ! 出力引数 integer,intent(inout):: i ! 入出力引数 k = func(i) do i = 1, N sum = sum + 1 end do i = 0; while(i < 10) { i++; } i = 0; do { i++; } while(i < 10); if (i .eq. 0.0) delta = 1 if (f .eq. 0.0) then else if (f .ge. 1.0) then else end if 比較構文:  数値: .eq. .ne. .gt. .ge. .lt. .le. 型キャスト:  dble(i), int(f), dble(z), aimag(z), areal(z) など C ファイル open(1, file='path1', status = 'UNKNOWN') open(2, file='path2', status = 'UNKNOWN') read(1, *) a write(2, *) a close(1) close(2) ファイルハンドル 0: 標準エラー ファイルハンドル 5: 標準入力 ファイルハンドル 6: 標準出力 status: 'OLD', 'NEW', 'REPLACE', 'UNKNOWN' action: 'READ': read only, 'WRITE': write only, 'READWRITE', both position: 'ASIS': デフォルト位置, 'REWIND': ファイルの先頭、'APPEND': ファイルの末尾 """