08.07.2016, 18:14
Hi all,
I want to compare a variable against a lot of different integers. I tried the following, expecting it to fail and it did. However, it should give you an idea of what I'm trying to do:
How do I actually do this, with out having 'myVariable' in the if statement a million times over?
Thanks
I want to compare a variable against a lot of different integers. I tried the following, expecting it to fail and it did. However, it should give you an idea of what I'm trying to do:
Код:
if(myVariable != 1 && 2 && 8 && 12 && 13 && 14 && 15){
Thanks