- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was wondering if it was replaced by anything that might be more useful.
The reason why -- I want to be able toexamine the console output window just before the program exits. If I don't put the PAUSE statement there, the window disappears before I have a chance to look at the printout....
I tried using STOP, but that doesn't work because the output disappears immediately.
A READ statement would do the job, but that seems to be kinda mickey-mouse.
So, was that replaced by anything else?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PAUSE is indeed a deleted feature in Fortran 2003 but most compilers, including ours, still support it. The standard suggests writing to and then reading from standard output - for your purpose, a simple:
read (*,*)
will do the trick and is very common.
read (*,*)
will do the trick and is very common.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you debug your program then setting a breakpoint 'pauses'
Here's another way to pause without PAUSE:
call wait()
Subroutine wait()
implicit none
character(1) Key
write *, 'press any key to continue'
Key = GETCHARQQ()
end subroutine wait
Gerry

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