line breaks

line breaks

I noticed that standard output (e.g. print* or write(*,*)) gives me line breaks when outputting to stdout or files.

I would like to change the default behaviour of this. I can do something like

RECL=1024

in open statements but I'd much rather change the default behaviour since I do not want to change code. I have never noticed this with compilers I used before (mostly Pathscale but also Portland, absoft, etc.). Am I missing something?

I suppose what you are missing is that the language provides great freedom for the implementation to start new records in list-directed output. Not only that, but the actual formatting chosen can vary. If you want a specific layout, then use an explicit format. Our compiler starts new lines with the assumption that one is viewing the output on a typical console display with 80-column width.

You can define an environment variable before starting your program, FORT_FMT_RECL, to be the value you want for the default RECL. I recommend against using this, though and suggest that you switch to an explicit format.

Regarding this old post, I'm rather puzzled by the unexpected behaviour of list-directed output.
I want to write on the console the value of a quad-precision (REAL*16) complex variable, say z.
As expected, print*, z or write(*,*)z prints out its value in 2 lines, with the record broken after the comma.

Then I tried to modify the list-directed output so that the record is printed on a single line. This is what I did:
(Using Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.0.079 Build 2012073)

The environment variable needs to be set _before_ the program starts.
The record length is captured during the "file" open. stdout (*) is opened prior to your above tesva= setenvqq("FORT_FMT_RECL=100")