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 |
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. |
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. |