+ 1

Can you use strings in switch statements?

15th Mar 2018, 9:10 PM
TheAtom
TheAtom - avatar
6 odpowiedzi
+ 2
Could I use enumeration
15th Mar 2018, 9:27 PM
TheAtom
TheAtom - avatar
+ 2
If you bothered to read the stuff Martin posted, you would have gotten your answer. Basically, you need something that can be evaluated as an integer. Enumeration assigns an integer value to each name.
15th Mar 2018, 10:40 PM
John Wells
John Wells - avatar
+ 1
I did read it. I was just wondering if it would work.
15th Mar 2018, 11:54 PM
TheAtom
TheAtom - avatar
- 1
yes it will work. you can use string in statements but you must always use ( "" )
17th Mar 2018, 3:08 PM
Nwadike Kenneth
Nwadike Kenneth - avatar