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

What should replace PAUSE statements?

WSinc
New Contributor I
1,112 Views
Hello -

I understand that they are obsolete, BUT
they are useful for marking places in the execution where some attention is needed, such
as error meesages. Example:

PAUSE "number out of range" or:
PAUSE "possiblesubscript overflow"

You suggested read (*,*) but that does not not convey any useful information.

so is there something else that would be just a suseful?
0 Kudos
2 Replies
mecej4
Honored Contributor III
1,112 Views
What one normally does in this situation is to write out an error/informative message before read (*,*). Then, before responding to the READ statement, other appropriate action may be taken if needed.
0 Kudos
Steven_L_Intel1
Employee
1,112 Views
Or if you know you are using Windows with an interactive user, a call to the Windows API routine MessageBox is easy from Fortran.
0 Kudos
Reply