- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
123456
not
123
456
having a new line? Say I want to use the statements:
write(6, '("123")')
write(6, '("456")')
and obtain:
123456
not
123
456
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about
write(UNIT=6, FMT='("123")',ADVANCE=NO)
I believe Intel Fortran also supports the old non-standard DEC version of this.
write(UNIT=6, FMT='("123")',ADVANCE=NO)
I believe Intel Fortran also supports the old non-standard DEC version of this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page