Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Line break during file write

alphajet
Beginner
230 Views

I'm trying to dump some 2D arrays in a text file, however, I have some very long lines of data and it seems to be automatically advancing a line in the middle of that data, I need to keep them all i a single line

0 Kudos
1 Reply
Steven_L_Intel1
Employee
230 Views
You are evidently using list-directed I/O (with a * format). When you use this, you give up control of where line breaks are inserted (among other things.) If you have specific requirements on the layout, use an explicit format. You can use G format if you want the individual values displayed similarly to list-directed. An alternative I don't recommend is to open the output file with a RECL= value that is the maximum line length you desire. This is non-portable.
0 Kudos
Reply