Check for multiple values when using comparison operators

Viewed 7639

I've always been under the impression that for any comparison statement, i.e. X == Y or X != Y is the format, and you chain statements together with && or ||.

Is there not some way to write X == (Y || Z) instead of X == Y || X == Z?

Edit: Since it has been established that this is not possible to do cleanly, how else could it be done?

4 Answers
Related