CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Advancing output to new page (https://www.cfd-online.com/Forums/main/210892-advancing-output-new-page.html)

Floyd_Pfeffer November 7, 2018 04:07

Advancing output to new page
 
I am writing code in Fortran 95. I write data to files using the WRITE statement with a format. Most files fit on one page but I just wrote one that is several pages long. I want to insert what would be called a "page break" in WORD. So that the output skips to the top of the next page before writing.
I have read that the descriptor 1 is to be used to advance to next page but I can't seem to get the code right. Anyone familar with this?
Floyd

blackjack November 9, 2018 15:04

Since you're not familiar with early fortran carriage control (I've used it for 40 years), I would suggest not learning it.

Instead, send a form-feed to the output. Word will correctly interpret this.

Example:

character*1 FF
FF=CHAR(12)
write(6,'(A)') 'first line on first page'
write(6,'(A)') FF//'first line on second page'
stop
end

compile and execute this, then open output with Word.

apoorv November 10, 2018 03:10

This discussion in stackoverflow might be helpful.
The method was made obsolete in f2008


if using gfortran you can use -std=g95 and use the old feature



https://stackoverflow.com/questions/...-fortran-90-95


All times are GMT -4. The time now is 02:05.