c++ - language extension __debug statement
- Richard (24/24) Nov 11 2002 Having some trouble with the __debug extension to c++ in a console-debug
- Christof Meerwald (8/15) Nov 11 2002 Works for me. Are you sure you are compiling with "-D"? (btw, "-DDEBUG" ...
- Richard (12/14) Nov 11 2002 Again? I think I'm getting a complex.. Ok, I'm using the IDE.. what swit...
- Walter (11/25) Nov 11 2002 -D isn't really supported by the IDDE, need to use it on the command lin...
- Jan Knepper (4/6) Nov 12 2002 Are you sure?
- Walter (4/10) Nov 12 2002 Yes, you can work around it that way, but it's a kludge.
- Jan Knepper (3/4) Nov 13 2002 It certainly is a KLUDGE!
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; }Works for me. Are you sure you are compiling with "-D"? (btw, "-DDEBUG" or "-DDEBUG=1" doesn't work) bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
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)Again? I think I'm getting a complex.. Ok, I'm using the IDE.. what switch do I need to use to get it to add -D to the sc build? And isn't -D just a notice for defines?? btw, the IDE has some real problems handling .def .mak .prj and .opn files. If I try and get clever with saving .opn files to match particular builds, something about the automatic parse causes the .def file to overwrite my defines line in settings. Eventually, I can get things screwed up enough to require delete of def and .mak. And sometimes even delete of the .prj file and start from scratch. But, I suppose it works for you.. sigh. Richard
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...orWorks for me. Are you sure you are compiling with "-D"? (btw, "-DDEBUG"do I"-DDEBUG=1" doesn't work)Again? I think I'm getting a complex.. Ok, I'm using the IDE.. what switchneed to use to get it to add -D to the sc build? And isn't -D just anotice fordefines?? btw, the IDE has some real problems handling .def .mak .prj and .opnfiles. If Itry and get clever with saving .opn files to match particular builds,somethingabout the automatic parse causes the .def file to overwrite my definesline insettings. Eventually, I can get things screwed up enough to require deleteofdef and .mak. And sometimes even delete of the .prj file and start from scratch. But, I suppose it works for you.. sigh. Richard
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:line.-D isn't really supported by the IDDE, need to use it on the commandSorry. I'll add that to the bug list for the IDDE.
Nov 12 2002
Walter wrote:Yes, you can work around it that way, but it's a kludge.It certainly is a KLUDGE! Jan
Nov 13 2002