Quantcast
Channel: Answers for "Enum style variable"
Viewing all articles
Browse latest Browse all 4

Answer by sneftel

$
0
0
What an enum *is*, is a set of non-editable named values. You can then make variables of that enum type, and those variables will be settable to any of the named values (with a useful dropdown box). It sounds like you don't actually mean "enum". Do you just want to organize a set of variables into its own scope? If so, the code you're using above is the most straightforward way of doing it. You shouldn't call it "enum", though, as that's an unrelated concept.

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>