T O P I C R E V I E W |
martin |
Posted - Sep 25 2009 : 10:21:58 AM Hey, I've a lot of #ifdef/#else/#endif statements in my code and would like to have inactive code colored normally but with a different background color. Something like http://www.xcomserver.de/VAXsugg.JPG |
5 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Oct 01 2009 : 08:55:06 AM martin how are you marking your inactive code? Is it simply wrapped in #if 0, #endif, or does it require a more complex method to work out if it is inactive?
In general VA is unable to work out if a given block of code is active or inactive, since it depends on so many things. Is the code being compiled in debug or release mode? Other environment variables, project settings, etc. |
sean |
Posted - Sep 25 2009 : 11:31:29 AM He wants normal VA symbol coloring with a special background color. |
feline |
Posted - Sep 25 2009 : 11:21:31 AM If this checkbox / feature is turned on then the IDE makes the inactive code grey, which is quite obvious, so you can see at a glance which code the IDE thinks is inactive.
Are you saying this never turns code grey for you? What about:
#if 0 // some code #endif
|
martin |
Posted - Sep 25 2009 : 10:56:11 AM Well, it's just a check box which disables graying out inactive code. But then I have no more hints which code is active or inactive. It would be nice if nothing but the background color would change for inactive code. |
feline |
Posted - Sep 25 2009 : 10:50:13 AM Depending on the IDE you are using, something like this may already exist. Look for the option:
IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting -> Colorize inactive code blocks in a different color
|