- #1
- 2,795
- 21
Fortran write (or print). How to controll "new line" or not
I haven't touched fortran for about 100 years (and that's only a very slight exaggeration). Recently I had to write a very small amount of code in Fortran 95. I've picked up most aspects pretty quickly but I'm still a bit vague on formating output (using either print or write).
One thing I can't figure out is how to control whether or not something is written on a new line or not. In the limited trial and error tests I've done it seems that (at least with numerical arguments) printing multiple variables in the one print statement puts them on the same line if I use the "generic" format string '*' and puts them on separate lines if use a specific format string, like "(f8.3)" for example.
I'm assuming that there is some way to control where and when print (or write) takes a new line. Can someone help me out.
thanks.
I haven't touched fortran for about 100 years (and that's only a very slight exaggeration). Recently I had to write a very small amount of code in Fortran 95. I've picked up most aspects pretty quickly but I'm still a bit vague on formating output (using either print or write).
One thing I can't figure out is how to control whether or not something is written on a new line or not. In the limited trial and error tests I've done it seems that (at least with numerical arguments) printing multiple variables in the one print statement puts them on the same line if I use the "generic" format string '*' and puts them on separate lines if use a specific format string, like "(f8.3)" for example.
I'm assuming that there is some way to control where and when print (or write) takes a new line. Can someone help me out.
thanks.