Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
November 11, 2002 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 |
November 11, 2002 Re: language extension __debug statement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Richard | 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? |
November 11, 2002 Re: language extension __debug statement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Christof Meerwald | 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 |
November 11, 2002 Re: language extension __debug statement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Richard | -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" 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 > > |
November 12, 2002 Re: language extension __debug statement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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.
|
November 13, 2002 Re: language extension __debug statement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan Knepper | 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 line. > > Sorry. I'll add that to the bug list for the IDDE. > |
Copyright © 1999-2021 by the D Language Foundation