For "flavorful" output during iteration procedure, I'd like to use following approach (I saw it for some program written in C++) in Fortran. Every new iteration gives me the line in the console with corresponding information:
Iteration XX Accuracy X.XXXXE-XX Time spent XX seconds
I want every new line to replace the previous one (i.e. labels "Iteration" "Accuracy" ... etc. remain unchanged, while values change).
I tried different variants including
backspace(6)
backspace(0)
write (*,*) char(8)//'Accuracy ...'
Of course, first two lines give a runtime error and the last gives nothing.
How can I implement such an approach?