Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Puzzled by console line length

$
0
0

This code (compiled with 17 Update 1)

PROGRAM P
USE ISO_FORTRAN_ENV
IMPLICIT NONE
INTEGER :: RECLENGTH
INQUIRE(UNIT=OUTPUT_UNIT,RECL=RECLENGTH)
WRITE(OUTPUT_UNIT,'(I4)') RECLENGTH
WRITE(OUTPUT_UNIT,'(A)') '<------ This character string is exactly 80 characters long, believe me! ------>'
WRITE(OUTPUT_UNIT,'(A)') 'Oops!'
END PROGRAM P

when run in a console window with a 80-character long line, produces the output:

 132<------ This character string is exactly 80 characters long, believe me! ------>

Oops!

Why is there a blank line between the two lines of text?


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>