Writing without new line

Writing without new line

How can I write to a text file without automatically
having a new line? Say I want to use the statements:
write(6, '("123")')
write(6, '("456")')

and obtain:

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

How about
write(UNIT=6, FMT='("123")',ADVANCE=NO)

I believe Intel Fortran also supports the old non-standard DEC version of this.

Standard way: use ADVANCE="NO":

write(6, '("123")', ADVANCE="NO")
write(6, '("456")')

I'm not sure that will work for console output, though. Non-standard way is using (or $) edit descriptor:

write(6, '("123",)')
write(6, '("456")')


Jugoslav www.xeffort.com

Leave a Comment

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