- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to detect the 'equivalence' of OUTPUT_UNIT (which is 6) and ERROR_UNIT (which is 0) when both are connected to the console, to avoid duplicate output there?
In other words, considering the code
WRITE(UNIT=OUTPUT_UNIT,FMT='(A)') 'Some text' WRITE(UNIT=ERROR_UNIT,FMT='(A)') 'Some text'
can we avoid having a duplicate output of 'Some text' when using the console? (when the console is not used, it's okay and in fact desired to have separate output to stderr and stdout).
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do an INQUIRE by unit on both units, asking for NAME=. Compare the strings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works beautifully, neat trick! Thanks Steve.
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