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

Request re Console applications

WSinc
New Contributor I
722 Views
Hello -

For every console application I have ever written, there is a problem:

When it terminates normally the console window disappears, so that
I don't have a chance to look at the output.

So far, I have gotten around this by putting a statement in it, like:

PAUSE "exiting..."

right before the END PROGRAM statement.

You don't like PAUSE statements, so I was wondering if there is a preferred way to
avoid having to do this (?)

I've noticed that graphics applications DO give you a chance to look at the output before quitting.
Why aren't the console applications consistent with that?

Can't they also give you a chance to examine the output?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
722 Views
The "graphics" option you refer to is for QuickWin. The simplest thing for a console application is to use:

READ (*,*)

instead of PAUSE - perhaps preceded by a message to press Enter to finish. You could get fancier with a request to press any key, or call MessageBox to put up a message that should be clicked (as you see for QuickWin.) I described another approach here.
0 Kudos
jimdempseyatthecove
Honored Contributor III
722 Views
Why not place a break point at the END PROGRAM?

Jim
0 Kudos
Reply