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

is this possible

It happened again.

I have many cases of modules with something like
#ifdef TYPEA
... many lines
#endif
#ifdef TYPEB
... many similar lines
#endif
#ifdef TYPEC
... many similar lines
#endif

It happens that I am looking at the type b code trying to figure out something in type a (the codes are VERY similar).

To avoid this, I have tried

blah,blah // comment TYPEA

and that "kind of works"

Now, the ideal would be if for type a I could do the following:
#ifdef TYPEA
#define ATYPE
#define BTYPE //
#define CTYPE //
#endif

and then just make it
ATYPE blah,blah // comment

Of course this does not work.
Does anyone have a trick that makes this possible?

Erik

Parents
  • the problem with "after preprocesor/after compile/after ..."s that you do not "see what you want to modify" (the common source) just "see where you want to modify" which is OK (to some extent) when only one of the variants is to be possible, the problem is that you do not - initially - know if what you are looking for is in a variant of something common. So, according to Murphy, you will use the "after" method and find soemthing you want to see "before" and, again according to Murphy, you will use the "before" method and find soemthing you want to see "after". Oh well, just a faint hope.

    Thanks to all,

    Erik

Reply
  • the problem with "after preprocesor/after compile/after ..."s that you do not "see what you want to modify" (the common source) just "see where you want to modify" which is OK (to some extent) when only one of the variants is to be possible, the problem is that you do not - initially - know if what you are looking for is in a variant of something common. So, according to Murphy, you will use the "after" method and find soemthing you want to see "before" and, again according to Murphy, you will use the "before" method and find soemthing you want to see "after". Oh well, just a faint hope.

    Thanks to all,

    Erik

Children
No data