- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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?
コピーされたリンク
2 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
