Convert integers to strings to create output filenames at run time

you can write to a unit, but you can also write to a string program foo character(len=1024) :: filename write (filename, “(A5,I2)”) “hello”, 10 print *, trim(filename) end program Please note (this is the second trick I was talking about) that you can also build a format string programmatically. program foo character(len=1024) :: filename character(len=1024) … Read more

Fortran 90 kind parameter

The KIND of a variable is an integer label which tells the compiler which of its supported kinds it should use. Beware that although it is common for the KIND parameter to be the same as the number of bytes stored in a variable of that KIND, it is not required by the Fortran standard. … Read more

Fortran running error

It seems to me you are completely misunderstanding tho processes of compilation and running. These lines are suspicious: gfortran numcbas.f < numcbas_c.data g77 numcbas.f < numcbas_c.data There is no reason to redirect a data file to the compiler command. The compiler first has to create an executable program which you then can run with your … Read more