+ 1

Can you use < or > in a switch?

looking at roulette, and i have done it with a nested if ball< 12 = first dozen ball<24= second dozen else ball = third dozen but just wondered if switch and case would be possible and if so, is it more efficient?

29th Jul 2017, 4:48 AM
Richard Appleton
Richard Appleton - avatar
2 Antworten
+ 11
No. Switch structures are used to evaluate specific cases and small ranges only.
29th Jul 2017, 4:53 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
ok. thank you
29th Jul 2017, 4:54 AM
Richard Appleton
Richard Appleton - avatar