Logical Operators
Table 10-6. Logical Operators
ExampleNameResult$a and $bAnd TRUE if both $a and $b are TRUE .$a or $bOr TRUE if either $a or $b is TRUE .$a xor $bXor TRUE if either $a or $b is TRUE , but not both.! $aNot TRUE if $a is not TRUE .$a && $bAnd TRUE if both $a and $b are TRUE .$a || $bOr TRUE if either $a or $b is TRUE .The reason for the two different variations of "and" and "or" operators is that they operate at different precedences. (SeeOperator Precedence.)



