|
And | |||
Operand And Operand | |||
Parameters: NONE | |||
Returns: NONE | |||
The And operator performs a logical (bitwise) And on the two specified operands. The AND operation takes each pair of bits from the two sides of the operator and evaluates when using the AND rule. AND RULE 1 and 1 = 1 1 and 0 = 0 0 and 1 = 0 0 and 0 = 0 So when we AND a pair of bits, we only get ONE when both bits are set(one), all other combinations produce a zero. AND is most commonly used within IF decisions where we want to ensure that two (or more) comparisons within an expression are true (1) before executing the code inside.
FACTS: * The keyword And can be interchanged with the & symbol * AND is always bitwise. * Most graphics rendering commands include And blending rules. To set use InkMode Mini Tutorial: Bitwise operations And, Or and Xor
This example would output.
|
Related Info: | Comparisons | Inkmode | Not | NotInt | Operators | Or | SetBit | SwapBit | Xor : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |