- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have built a console application using the Visual Fortran compiler with Visual Studio. When my application is terminated (either due to normal termination or due to a fatal error) the console window immediately closes.
I would like to ask if there is a way to maintain the console window open after the program is terminated. This will be useful for situations where I have abnormal termination. Alternatively, is it possible to duplicate the "screen print" of the console window to a file?
Any help on this will be greatly appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree, but this is not what I want. I want to double-click on the app to run it, instead of having to run it from cmd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once the program returns from the main program, Windows closes the console window. But take a look at https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/275071#comment-1548443 for an alternative.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
just write a
...
READ(*,*)
right before
END PROGRAM ...
so you have a kind of "press enter to close" ;)
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page