Let us consider the following 1 line Fortran code:
program test
print*,‘\n\n 12 \n3 \n \n5 6 \n 8’
end program test
I expected to see a single line (like in gfortran8+ or ifort)
however, pgf90 (18+)generate multiple lines output :
"
12
3
5 6
8
"
apparently as if it treats the ‘\n’ from within the fortran string as a c-like newline delimiter.
- Also the code:
program test
print*,‘\\n\\n 12 \\n3 \\n \\n5 6 \\n 8’
end program test
prints with pgf90:
\n\n 12 \n3 \n \n5 6 \n 8
instead of original fortran string
‘\\n\\n 12 \\n3 \\n \\n5 6 \\n 8’
is this compiler issue or fortran standard does not guarantee
print*‘,\n\n 12 \n3 \n \n5 6 \n 8’
is
\n\n 12 \n3 \n \n5 6 \n 8
?