Fortran2003以降ならストリームが使える
http://www.nag-j.co.jp/fortran/fortran2003/Fortran2003_7_1.html#AUTOTOC_7_1