Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - language extension __debug statement
Having some trouble with the __debug extension to c++ in a console-debug project. When I try: #include <iostream> void main(int argc, char *argv[]) { __debug int HD = 1; __debug(HD)cout << "working" << endl; } There is no output. Perhaps I have misunderstood the syntax.. I thought that "__debug (expression) statement else statement" was a conditional control ala "(expression) ? statement : statement". Did I get it wrong? mmmm.. I also try just: #include <iostream> void main(int argc, char *argv[]) { __debug cout << "working" << endl; } and no output. Has the __debug extension to c++ been deprecated in DM? Perhaps I need throw some compiler switch? Ok, I know its an extension. I have one core module that has copious output when debug, and it is useful to turn it on and off at times while in a debug build. Richard Nov 11 2002
On Mon, 11 Nov 2002 17:05:43 +0000 (UTC), Richard wrote:When I try: #include <iostream> void main(int argc, char *argv[]) { __debug int HD = 1; __debug(HD)cout << "working" << endl; } Nov 11 2002
In article <aqor8e$105r$1 digitaldaemon.com>, Christof Meerwald says...Works for me. Are you sure you are compiling with "-D"? (btw, "-DDEBUG" or "-DDEBUG=1" doesn't work) Nov 11 2002
-D isn't really supported by the IDDE, need to use it on the command line. Sorry. I'll add that to the bug list for the IDDE. "Richard" <fractal clark.net> wrote in message news:aqot8h$12i7$1 digitaldaemon.com...In article <aqor8e$105r$1 digitaldaemon.com>, Christof Meerwald says...Works for me. Are you sure you are compiling with "-D"? (btw, "-DDEBUG" Nov 11 2002
Are you sure? There was a trick with the "Defines" area in the IDDE... Jan Walter wrote:-D isn't really supported by the IDDE, need to use it on the command line. Sorry. I'll add that to the bug list for the IDDE. Nov 12 2002
Yes, you can work around it that way, but it's a kludge. "Jan Knepper" <jan smartsoft.us> wrote in message news:3DD165C5.D4B34E58 smartsoft.us...Are you sure? There was a trick with the "Defines" area in the IDDE... Jan Walter wrote:-D isn't really supported by the IDDE, need to use it on the command Nov 12 2002
Walter wrote:Yes, you can work around it that way, but it's a kludge. Nov 13 2002
|