2020-11-09から1日間の記事一覧
fortranでファイルの行数を数える方法をメモ open(1, file = './test.txt', status = 'old') counter=0 do read(1,'()',end=999)counter = counter + 1end do 999 close(1) ここで、counterの最後の結果が、ファイルの行数。
fortranでファイルの行数を数える方法をメモ open(1, file = './test.txt', status = 'old') counter=0 do read(1,'()',end=999)counter = counter + 1end do 999 close(1) ここで、counterの最後の結果が、ファイルの行数。