table 7-3. logical operators(表7-3 逻辑操作符)
example name result?/font>
$a and $b and true of both $a and $b are true.?/font>
$a or $b or?/font> true if either $a or $b is true.?/font>
$a xor $b or?/font> true if either $a or $b is true, but not both.?/font>
! $a not?/font> true if $a is not true.?/font>
$a && $b and?/font> true of both $a and $b are true.?/font>
$a || $b or?/font> true if either $a or $b is true.
两种不同“and”和“or”操作符的变化实际上是由于操作的不同优先级别而造成的。(参考以下内容。)
