I know you can write a statement like:
if (num1 != a && num1 != b && num1 != c ..........&& num1 != z)
(do something);
But is there an easier way to compare the num1 variable to 26 other variables? Kinda like:
if (num1 != a,b,c,d,e,f,g.......)
(do something);
If
a..gare contiguous constant/enum values then just use a range check.If they are non-contiguous but constant then maybe use a switch statement.
otherwise if they are just arbitrary variables or expressions then you may have just have to do it with multiple tests.