Re: Conditional code
From: Andrey Tarasevich (andreytarasevich_at_hotmail.com)
Date: 02/02/05
- Next message: John Smith: "Re: Conditional code"
- Previous message: wongjoekmeu_at_yahoo.com: "Handling Exception"
- In reply to: Dave Moore: "Re: Conditional code"
- Next in thread: John Smith: "Re: Conditional code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 02 Feb 2005 13:29:17 -0800
Dave Moore wrote:
>
> ROFL .. I was wondering what on earth you were talking about until I looked
> closely at my earlier suggestion .. what I meant was:
>
> #else
> #define dbgprintf //
>
> that way whatever the args of dbgprintf are, they will be turned into a
> comment. I knew I had used comments previously to deal with this, but I
> didn't remember exactly how. Sorry for the confusion.
> ...
This might work with some compilers, but won't work in general. In C++
the comments are fully processed (and replaced with whitespace) before
the preprocessor has a chance to do its thing. The compiler is free to
assume that preprocessor doesn't generate any new comments.
-- Best regards, Andrey Tarasevich
- Next message: John Smith: "Re: Conditional code"
- Previous message: wongjoekmeu_at_yahoo.com: "Handling Exception"
- In reply to: Dave Moore: "Re: Conditional code"
- Next in thread: John Smith: "Re: Conditional code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|