Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28636 Discussions

About DFORRT.dll's abort message!

brb36641
Beginner
500 Views
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
0 Kudos
4 Replies
Steven_L_Intel1
Employee
500 Views
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.
0 Kudos
brb36641
Beginner
500 Views
Thank you.
It is good suggestion for me to use GOTO the END statement.
Meanwhile what kind situation should I use STOP statement?
0 Kudos
Steven_L_Intel1
Employee
500 Views
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.
0 Kudos
brb36641
Beginner
500 Views
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.
0 Kudos
Reply