- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have one issue regarding DFORRT.dll abort message in DOS prompt.
When exe type program which is written as follows has run under DOS prompt, I get above mess.
Sorce code summerly
----------------------------------------------------------------------------------------------------
program main-routine
...
inquire('same-file',exist=yes)
if (YES) stop
...
write(*,*) 'Test Program'
...
stop
end
----------------------------------------------------------------------------------------------------
If same-file is exit under working folder, this program running will normal stop, I think, However sometile I get abort message of this.
Should I change the cord as follows,
if (yes) goto 10
...
10 stop
end
How is my idea? Is it correct under specification of Fortran laungage?
Let me know, please.
Thanks
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the exact abort message you get? I don't completely understand your question.
STOP is not a good thing to use, especially if you may want to change your program into a DLL in the future. I suggest a GOTO to the END statement.
STOP is not a good thing to use, especially if you may want to change your program into a DLL in the future. I suggest a GOTO to the END statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
It is good suggestion for me to use GOTO the END statement.
Meanwhile what kind situation should I use STOP statement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would not use it at all in programs I wrote. But it is certainly convenient in places where you just want to exit the program in case of an error. It is a very old feature of the language.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see it is old style to use STOP statement, when I stop the programs.
Thank you for kindness. Is that programiing style 80's?
I am clear and finish to solve my issue.
![](/skins/images/DF2E495CEC88D713A66401CF495CD875/responsive_peak/images/icon_anonymous_message.png)
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