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

A.7.18 Comma Operator

  • expression:
    • assignment-expression expression , assignment-expression

A pair of expressions separated by a comma is evaluated left-to-right, and the value of the left expression is discarded. The type and value of the result are the type and value of the right operand. All side effects from the evaluation of the left-operand are completed before beginning the evaluation of the right operand. In contexts where comma is given a special meaning, for example in lists of function arguments (Par.A.7.3.2) and lists of initializers (Par.A.8.7), the required syntactic unit is an assignment expression, so the comma operator appears only in a parenthetical grouping, for example,

  • f(a, (t=3, t+2), c)

has three arguments, the second of which has the value 5.

TCPL/A.07.18_Comma_Operator (2008-02-23 15:36:43由localhost编辑)

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