Source Insight: Show me Enum Values
Posted
by JXG
on Stack Overflow
See other posts from Stack Overflow
or by JXG
Published on 2010-02-28T08:01:08Z
Indexed on
2010/03/15
11:09 UTC
Read the original article
Hit count: 337
I'm programming in C and using Source Insight.
I have an enum type with a lot of constants (like 100). I have debug prints that print out variable values, but they (of course) print out as integers.
What I'd like to do is click on the name of an enum constant, and see its numeric value displayed somewhere. (I've seen this done in a Visual Studio plugin, so it must be possible.)
That is, assume I have
enum colors {
ORANGE, PURPLE, PINK
};
I want to click on (or select, or something) PURPLE
and see the value 1
somewhere visible (ideally, the symbol window or context window, but I'm not particular).
Is there an easy way to do this in Source Insight? Is there a difficult way, at least (such as writing a macro)?
© Stack Overflow or respective owner