vendredi 29 juin 2018

If statement that checks a list of numbers

I want to write an if statement that will return if a variable does not equal one number in the list. Conceptually I want it to do this:

if (VARX [DOES NOT EQUAL ONE OF THESE NUMBERS] 194||301||177||249||22||131||56. . .){ return; }

The actual list of numbers I have is approx 250 different numbers. Is there an easy way to accomplish this with one if statement?

Aucun commentaire:

Enregistrer un commentaire