This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

rather than #ifdef

I am working on some stuff with 4711 #ifdefs and, on most global searches, end up looking at inactive code.

To obtain 'marked' code lines I tried to replace

#ifdef BLAH
.......

with
//#define BLAH
#define BLAH //
BLAH ....

this works for BLAH = nothing, but I can't find a way to make it work for '//'

any ideas?

Erik

Parents
  • It won't - because the preprocessor strips comments before it starts thinking about macro sustitution!

    If you want just the "active" stuff, you need to work with actual references - rather than just doing text searches.

    In uVision, use the Code Browser.

    CodeWright can be configured to hide inactive lines, but I'm note sure if it can search only on active references.

    Eclipse can search only on active references .

Reply
  • It won't - because the preprocessor strips comments before it starts thinking about macro sustitution!

    If you want just the "active" stuff, you need to work with actual references - rather than just doing text searches.

    In uVision, use the Code Browser.

    CodeWright can be configured to hide inactive lines, but I'm note sure if it can search only on active references.

    Eclipse can search only on active references .

Children