Quote:
Originally Posted by FalconCRO
There's something I can't get to understand with enums. Observe the following code:
Code:
enum examples {
ex_1,
ex_2
}
new array[examples];
Now, if I try to access ex_1 cell, but let's say that in that specific part of the code it's more convenient to me to simply use array[0], instead of array[ex_1], I would get a tag mismatch warning. In order to get rid of the warning, I need to do this: array[examples:0], but why? I thought it has something to do with strong and weak tags, but I'm using a weak one and it still happens.
|
It's most probably because you've declared the index of the array as the enum.
Edit: Forget what I said earlier (removed)
I wonder, however, why do you want to use an enum as your array index if you somehow find it easier/more convenient to use numbered indexes at times?