Line break during file write

Line break during file write

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

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today