Quantcast
Channel: User Chamilyan - Stack Overflow
Viewing all articles
Browse latest Browse all 43

Variable case list in switch statement

$
0
0

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 all articles
Browse latest Browse all 43

Trending Articles