31.10.2009, 18:52
Please, how to negate this expression - keys & KEY_FIRE. I tried keys ~ KEY_FIRE but this is incorrect syntax for pawno. Thanks in advance for your help.
Originally Posted by pawn-lang.pdf
~e - results in the one's complement of e.
e1 >> e2 - results in the arithmetic shift to the right of e1 by e2 bits. The shift operation is signed: the leftmost bit of e1 is copied to vacant bits in the result. e1 >>> e2 - results in the logical shift to the right of e1 by e2 bits. The shift operation is unsigned: the vacant bits of the result are filled with zeros. e1 << e2 - results in the value of e1 shifted to the left by e2 bits; the rightmost bits are set to zero. There is no distinction between an arithmetic and a logical left shift e1 & e2 - results in the bitwise logical "and" of e1 and e2. e1 | e2 - results in the bitwise logical "or" of e1 and e2. e1 ^ e2 - results in the bitwise "exclusive or" of e1 and e2. |
(statement) == false
!(statement)