- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'd like to return exit error codes if an error occures, but I don't want to output this exit error code.
Currently I use:
But this shows not only the error message but also a "spurious" one. If I write
or simply
then the exit status code is zero.
Any ideas?
Tobias
I'd like to return exit error codes if an error occures, but I don't want to output this exit error code.
Currently I use:
if(iostat /= 0) then
write(ERROR_UNIT,*) 'Cannot open file "',trim(filename),'"'
stop 1
end if
But this shows not only the error message but also a "spurious" one. If I write
stop "some error string"
or simply
stop
then the exit status code is zero.
Any ideas?
Tobias
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try CALL EXIT(1) instead.

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