# FORTRAN WRITE question

by Choragos
Tags: fortran, output, screen, write
 P: 20 Hello. In producing screen output from Fortran, I use the write statement. Back in the day, there was a way to use the FORMAT statement to allow you to replace text on the screen with different text. For example, counting up percentage complete of a process or something like that. Well, Fortran 90 put the nix on that and now I don't know how to do it. For all of us who don't want to let go of our DOS prompts (or who sit in Linux command lines), is there a way to accomplish this task? Thanks Andy
 Sci Advisor P: 1,498 I've never heard of this. What was the procedure to do it in previous versions?
 P: 20 It was buried in the FORMAT statement. I believe this is how it was done (I had to change the code and I believe this was the original version): 15 format('+Processing decay number ',I6) I believe it's that '+' sitting there. If that doesn't make any sense I'll go on the hunt and make sure this is the original version.
P: 366

## FORTRAN WRITE question

I believe it is called the non-advancing I/O in Fortran 90.
You would use this to prompt for input on the same line after displaying a text, or as you said, to give the percentage completion.
It would typically take the form:
WRITE (*,*, ADVANCE='NO') ....
 Sci Advisor P: 1,498 If you got it to work, then let me know how you did. I wrote a quick sample program PROGRAM test do i=1,10 WRITE(6,999,ADVANCE='NO') i END DO 999 FORMAT(TL2I2.2) END PROGRAM Which outputs 01020304050607080910:~> TRn and Tn both seem to skip the wrong way. I can't figure out how to overwrite. p.s. Good fortran reference though