www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - VisualD Console WIndow Disappears

reply "RedShift" <cmpons gmail.com> writes:
So, I'm just starting to get into D, using the extension for VS 
called Visual D. Is there any way to stop the console from 
disappearing like in C++? Like C + F5 (which doesn't seem to 
work). Or like a getline?
Feb 14 2012
next sibling parent "Bernard Helyer" <b.helyer gmail.com> writes:
On Wednesday, 15 February 2012 at 07:27:56 UTC, RedShift wrote:
 So, I'm just starting to get into D, using the extension for VS 
 called Visual D. Is there any way to stop the console from 
 disappearing like in C++? Like C + F5 (which doesn't seem to 
 work). Or like a getline?
Just pop a stdin.readln call at the bottom of your program?
Feb 15 2012
prev sibling next sibling parent Matthias Pleh <user example.net> writes:
On 15.02.2012 08:27, RedShift wrote:
 So, I'm just starting to get into D, using the extension for VS called
 Visual D. Is there any way to stop the console from disappearing like in
 C++? Like C + F5 (which doesn't seem to work). Or like a getline?
This sort of question is better fittet in d.D.learn newsgroup, but anyway, I think this helps: import std.stdio; import std.c.stdlib; // import for system int main(string[] argv) { writeln("Hello D-World!"); system("PAUSE"); return 0; } ^^Matthias
Feb 15 2012
prev sibling parent reply "Alf P. Steinbach" <alf.p.steinbach+usenet gmail.com> writes:
On 15.02.2012 08:27, RedShift wrote:
 So, I'm just starting to get into D, using the extension for VS called
 Visual D. Is there any way to stop the console from disappearing like in
 C++? Like C + F5 (which doesn't seem to work). Or like a getline?
This absolutely seems like a bug in Visual D, as does the resource include path thing. Apart from changing the source code, which I guess you have considered and don't want to do, you still have these two more normal options: * Run the program from the Windows command line <g>, or * Set a breakpoint on the closing brace of `main`, and run the program in the debugger (e.g. keypress [F5]). When it hits the breakpoint at the end, use [Alt Tab] to go back to the program's console window. For the first option, note that you can right click an editor tab in Visual Studio and fire up an Explorer window for that folder. From the Explorer window it's then a very short journey to a command prompt: hold down Shift and right-click the relevant folder (I guess that would be a Debug binaries folder), and in Windwoes 7 choose "Open command window here". Cheers & hth., - Alf
Feb 15 2012
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 15.02.2012 12:20, Alf P. Steinbach wrote:
 On 15.02.2012 08:27, RedShift wrote:
 So, I'm just starting to get into D, using the extension for VS called
 Visual D. Is there any way to stop the console from disappearing like in
 C++? Like C + F5 (which doesn't seem to work). Or like a getline?
As far as I know, the pause happens in C++ only when running without a debugger. Version 0.3.30 has an option in the debugger settings to also add this pause.
 This absolutely seems like a bug in Visual D, as does the resource
 include path thing.
The resource include works for me, but I am not sure why. This is part of the generated command line: rc /fo..\bin\Debug\obj\visuald.res /IC:\Program /IFiles\Microsoft /ISDKs\Windows\v7.0\\include visuald.rc I'll fix it...
Feb 15 2012