Antoine Junod <to**@tots-ns.net> writes:
I would like to index an "array" (semantic, not logic) with litterals in
a smart way. I could do as follow:
#define WHILE 0
#define IF 1
#define FOR 2
...
and then use WHILE IF FOR to index my array. But that is not really
smart.
I have no idea what you mean by "semantic, not logic". Since you put
the word the word "array" in quotation marks, I'm guessing you don't
mean an array in the usual C sense, but I don't know what you do mean.
I suspect you're looking for an enumeration type.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.