[Tutorial] Enumerators (enums). What they actually are?
#28

Quote:
Originally Posted by FalconCRO
View Post
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?
Reply


Messages In This Thread
Enumerators (enums). What they actually are? - by iPLEOMAX - 14.02.2012, 17:00
Re: Enumerators (enums). What they actually are? - by T0pAz - 14.02.2012, 17:05
Re: Enumerators (enums). What they actually are? - by ServerScripter - 14.02.2012, 17:10
Re: Enumerators (enums). What they actually are? - by iPLEOMAX - 14.02.2012, 18:31
Re: Enumerators (enums). What they actually are? - by -CaRRoT - 14.02.2012, 18:53
Re: Enumerators (enums). What they actually are? - by iPLEOMAX - 15.02.2012, 09:06
Re: Enumerators (enums). What they actually are? - by Calgon - 15.02.2012, 09:07
Re: Enumerators (enums). What they actually are? - by iPLEOMAX - 15.02.2012, 09:24
Re: Enumerators (enums). What they actually are? - by Vince - 15.02.2012, 10:19
Re: Enumerators (enums). What they actually are? - by iPLEOMAX - 15.02.2012, 10:33
Re: Enumerators (enums). What they actually are? - by KingHual - 15.02.2012, 11:32
Re: Enumerators (enums). What they actually are? - by Max_Coldheart - 15.02.2012, 13:08
Re: Enumerators (enums). What they actually are? - by Zarky - 15.02.2012, 13:33
Re: Enumerators (enums). What they actually are? - by kizla - 15.02.2012, 19:01
Re: Enumerators (enums). What they actually are? - by -ExG-VirusKiller - 16.02.2012, 04:33
Re: Enumerators (enums). What they actually are? - by Nonameman - 19.02.2012, 00:17
Re: Enumerators (enums). What they actually are? - by Minion - 17.07.2012, 11:53
Re: Enumerators (enums). What they actually are? - by Sniper Kitty - 06.09.2012, 06:52
Re: Enumerators (enums). What they actually are? - by Slice - 06.09.2012, 06:57
Re: Enumerators (enums). What they actually are? - by FalconCRO - 11.01.2013, 20:29
Re: Enumerators (enums). What they actually are? - by leonardo1434 - 11.01.2013, 21:46
Re: Enumerators (enums). What they actually are? - by LarzI - 11.01.2013, 21:55
Re: Enumerators (enums). What they actually are? - by FalconCRO - 11.01.2013, 22:19
Re: Enumerators (enums). What they actually are? - by LarzI - 11.01.2013, 22:23
Re: Enumerators (enums). What they actually are? - by gDarius - 14.01.2013, 14:02
Re: Enumerators (enums). What they actually are? - by FalconCRO - 13.02.2013, 11:06
Re: Enumerators (enums). What they actually are? - by CreativityLacker - 13.02.2013, 11:38
Re: Enumerators (enums). What they actually are? - by LarzI - 13.02.2013, 13:12
Re: Enumerators (enums). What they actually are? - by SomebodyAndMe - 09.05.2013, 15:29
Re: Enumerators (enums). What they actually are? - by iPLEOMAX - 09.05.2013, 19:13
Re: Enumerators (enums). What they actually are? - by Frede - 11.05.2013, 08:56
Re: Enumerators (enums). What they actually are? - by cuemur - 17.03.2014, 09:19
Re: Enumerators (enums). What they actually are? - by Baltazar - 08.04.2014, 01:44
Re: Enumerators (enums). What they actually are? - by Binx - 08.04.2014, 01:55
Re: Enumerators (enums). What they actually are? - by Niko_boy - 08.04.2014, 04:20
Re: Enumerators (enums). What they actually are? - by khRamin78 - 24.06.2015, 06:35
Re: Enumerators (enums). What they actually are? - by Konverse - 24.06.2015, 07:02
Re: Enumerators (enums). What they actually are? - by andyandyy8 - 24.06.2015, 09:28
AW: Enumerators (enums). What they actually are? - by Br3ad - 06.07.2015, 14:49
Re: Enumerators (enums). What they actually are? - by TheRaGeLord - 07.07.2015, 10:36

Forum Jump:


Users browsing this thread: 2 Guest(s)