R
RC
I have some code that needs to know if an int variable is one of several
possible values.
What is a better way of performing the test than stacking a bunch of case:
in a switch statement? I also don't want to have a bunch of logical ORs in
an if() statement (e.g., if (someInt == 25 || someInt == 18 || someInt ==
87....)
Any suggestions?
Thanks!
possible values.
What is a better way of performing the test than stacking a bunch of case:
in a switch statement? I also don't want to have a bunch of logical ORs in
an if() statement (e.g., if (someInt == 25 || someInt == 18 || someInt ==
87....)
Any suggestions?
Thanks!