Quantcast
Viewing latest article 19
Browse Latest Browse All 43

Variable case list in switch statement

I have a somewhat complicated need for a switch statement with a variable case list. It would look like this in pseudo-code..

switch(check){case 1:case 2:..case etc: do somethingbreak; }

in theory the case list would be generated off an array where I don't know the amount of possible case values beforehand.

[1,2,3,4,5 ... ]

is this possible?


Viewing latest article 19
Browse Latest Browse All 43

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>