Good afternoon All,
Is it possible to create a enum variable then using it in a case.
After moving to the next case with a increment of that variable.
Cheer,
Xawtor
Or
Is it possible to create a enum variable then using it in a case.
After moving to the next case with a increment of that variable.
Cheer,
Xawtor
B4X:
Type SeasonsType (Summer As Int, Fall As Int, Winter As Int, Spring As Int)
Dim Seasons As SeasonsType
Seasons.Summer = 0:Seasons.Fall = 1:Seasons.Winter = Seasons.Spring = 3
Select Seasons
Case 0: Seasons++ 'Summer
Case 1: Seasons++ 'Fall
Case 2: Seasons++ 'Winter
Case 3: Seasons++ 'Sping
End Select
Or
B4X:
Type SeasonsType (Summer As String, Fall As String, Winter As String, Spring As String)
Dim Seasons As SeasonsType
Seasons.Summer = "Summer":Seasons.Fall = "Fall":Seasons.Winter = "Winter":Seasons.Spring = "Spring"
Select Seasons
Case "Summer":Seasons++ 'Summer
Case "Fall": Seasons++ 'Fall
Case "Winter":Seasons++ 'Winter
Case "Spring":Seasons++ 'Sping
End Select