Standard input and output units in Fortran 90?
If you have a Fortran 2003 compiler, the intrinsic module iso_fortran_env defines the variables input_unit, output_unit and error_unit which point to standard in, standard out and standard error respectively. I tend to use something like #ifdef f2003 use, intrinsic :: iso_fortran_env, only : stdin=>input_unit, & stdout=>output_unit, & stderr=>error_unit #else #define stdin 5 #define stdout 6 … Read more