ifffam
ifffam

Reputation: 175

overwiting with backspace leaving an empty line

Is there a one-line way to enforce gfortran to overwrite the last line written in an output file with a blank space, so the next line is written just below an empty line and not overwriting the previous one ? backspace(fileunit) places the cursor at the beginning of that line but then the next line is written right there thus not leaving a blank line. Granted, one could do

backspace(fileunit)
write(fileunit)

which leaves the blank line, but I would like something like

backspace (fileunit,advance='yes') if that exists (that is, a single-line command). Previously in my code, I've used the write command with the advance='no' option, but I guess that's irrelevant

Upvotes: 0

Views: 44

Answers (0)

Related Questions