- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why not place a break point at the END PROGRAM?
Jim
Jim
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