Okay, I found one way to go backwards
WRITE(*,'(A)',ADVANCE='NO')8
which prints a backspace. However, for some reason this cannot be used to for example indicate progress. So loop
DO i=1,10000
IF (MODULO(i,100)==0)
WRITE(*,'(A)',ADVANCE='NO')8
WRITE(*,'(A)',ADVANCE='NO')i/100
END IF
END...
There is one I can think of that can be used to change the file name. But it is not elegant. You save the first part of the file name and add the '.out' in the end. Then you read the whole thing again. For example
PROGRAM filename
IMPLICIT NONE
CHARACTER(LEN=7) :: inp,outp
READ(*,*)inp...
It helped - thank you! But I would also be interested in going backwards. I tried BACKSPACE but I just ended up with illegal seek error message. Can this command be used in this contex?
Hi!
I couldn't find anywhere how to write several times on the same line or how to read and write on the same line (for example first write c:\ and then read the input). I have thought about this before but have always been able to bypass it somehow. At the moment I would need this to make a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.