F
Frank Miller
Hello,
I have project written in C where are a lot of code looks like:
#define Vaule A 1
#define Value B 2
#define Value X 9
#define Switch ValueA
#if (Switch == ValueB)
code1
#endif
#if (Switch != ValueX)
code2
#endif
#defines are checked thousands of times within the whole project, this
makes the code nearly unreadable.
Ist there a tool or an editor out there which takes the current value
of the #defines and then copies
or shows only the part of the sourcecode, which is valid for the
current switch setting?
In my brief example above, it shold take/show only the code below #if
(Switch != ValueX)
This would it make much more easier to read the code.
I have to work on a project which has some dozends sourcecode files.
Many thanks for any hint!
Regards
Frank
I have project written in C where are a lot of code looks like:
#define Vaule A 1
#define Value B 2
#define Value X 9
#define Switch ValueA
#if (Switch == ValueB)
code1
#endif
#if (Switch != ValueX)
code2
#endif
#defines are checked thousands of times within the whole project, this
makes the code nearly unreadable.
Ist there a tool or an editor out there which takes the current value
of the #defines and then copies
or shows only the part of the sourcecode, which is valid for the
current switch setting?
In my brief example above, it shold take/show only the code below #if
(Switch != ValueX)
This would it make much more easier to read the code.
I have to work on a project which has some dozends sourcecode files.
Many thanks for any hint!
Regards
Frank