Print (123 and 4)

BlitzMax Forums/BlitzMax Beginners Area/Print (123 and 4)

JBR(Posted 2005) [#1]
I'm using the demo of BMax and it is returning 4 for the answer to (123 and 4).

Which is wrong!

123 = 01111011
4 = 00000100

Help
Marg


Scott Shaver(Posted 2005) [#2]
(123 & 4) <-- bitwise
(123 and 4) <-- logical

although it does seem like the logical operator should return true not 4. but any non-zero value is true.


JBR(Posted 2005) [#3]
Thanks Scott