The inclusion of arrays addition in Blitzmax 1.26 has given us the ability to simulate Enumeration..
Try this:
Try this:
Const SYM_A% = 1 Const SYM_B% = 2 Const SYM_C% = 3 Const SYM_D% = 4 Const SYM_E% = 5 Const SYM_F% = 6 Local symbol:TEnum = New TEnum Local a%[] = [SYM_F,SYM_E,SYM_D] Local b%[] = [SYM_A,SYM_B,SYM_C] symbol.value = SYM_D If Symbol.in( a+b ) Then DebugLog "Yes it's found" showSymbols( a+b ) '######################################## Function showSymbols( list%[] ) For Local item% = EachIn list DebugLog item Next End Function '######################################## Type TEnum Field value% '---------------------------------------- Method in( list%[] ) For Local item% = EachIn list If value=item Then Return True Next Return False End Method End Type