Quote:
|
Originally Posted by Imajie
Wouldn't you want to use AND not OR because it would always evaluate as true with OR since it is either greater than 20 OR less than 40.
|
I second that. Also, if you are meaning to do a logical OR, you need to be using a double pipe (i.e ||) not a single (i.e. |). The single pipe represents a bitwise OR, which can give you drastically different results. If you switch over to the AND, make sure that you use a double ampersand (i.e. &&) for the same reason.
You can find more information about bitwise operations
here