版本2和3间的区别
于2007-07-19 07:43:34修订的的版本2
大小: 725
编辑: czk
备注:
于2008-02-23 15:34:54修订的的版本3
大小: 725
编辑: localhost
备注: converted to 1.6 markup
未发现区别!

A.7.14 Logical AND Operator

  • logical-AND-expression:
    • inclusive-OR-expression

      logical-AND-expression && inclusive-OR-expression

The && operator groups left-to-right. It returns 1 if both its operands compare unequal to zero, 0 otherwise. Unlike &, && guarantees left-to-right evaluation: the first operand is evaluated, including all side effects; if it is equal to 0, the value of the expression is 0. Otherwise, the right operand is evaluated, and if it is equal to 0, the expression's value is 0, otherwise 1.

The operands need not have the same type, but each must have arithmetic type or be a pointer. The result is int.

TCPL/A.07.14_Logical_AND_Operator (2008-02-23 15:34:54由localhost编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.