[Tutor] or synxtax in if statement

Eric Brunson brunson at brunson.com
Fri Aug 31 22:24:34 CEST 2007


David Bear wrote:
> I think I want to be lazy and express this
>
> if a == b | a = c
> (if a equal b or a equals c)
> using
>
> if a == b | c
>
> it seems to work.. but I'm not sure if it is correct -- and I haven't seen
> any documentation on using this type of syntax.
>
>
>   
The pipe is the "bitwise or" operator.  I think you're looking for "or".

And... "if a==b or c" won't work.

e.



More information about the Tutor mailing list