open (1,file = 'out')
write(*,*) 'input : m'
read(*,*) m
write(*,*) 'input : n'
read(*,*) n
I was so surprised to find there is still the one who makes fortran language alive!!!
That's good news for me at least.
I am here to try fortran 95 to explain your question (assumed you use this version other rather 77) under linux OS environment.
For more detail in I/O statement, fortran documentation is always a good place to give it a go!
[open] ---> open a file called 'out' and mark it as integer 1.
[write] ---> write a string 'input: m' into file 'out' supposed, despite 1 should replace *.
[read] ---> read the content from your target file, which is supposed to be file marked as 1
for the sake of better understanding fortran I/O statement, I wrote a sample code combined with above command.
program write4readBefore you run this code, just ensure you save 'data.txt' file in the same directory of this fortran code.
'data.txt'
123The running result should display as