c语言提供一种特殊的运算符,逗号运算符,优先级别最低,它将两个及其以上的式子联接起来,从左往右逐个计算表达式,整个表达式的值为最后一个表达式的值。如:(3+5,6+8)称为逗号表达式,其求解过程先表达式1,后表达式2,整个表达式值是表达式2的值,如:(3+5,6+8)的值是14;a=(a=3*5,a*4)的值是60,其中(a=3*5,a*4)的值是60, a的值在逗号表达式里一直是15,最后被逗号表达式赋值为60,a的值最终为60。
不可以用操作符、逗号或闭括号作为表达式的开始符。
Expressions must not begin with an operator, comma, or closing parenthesis.
还要注意,这里使用. set将变量str_size的值设置为逗号后面的表达式。
Also note the use of.set to initialize the value of the variable STR_SIZE to the expression following the comma.
就是一个有序的序列,好,那么我们怎么创建元组呢?,好,表达式是,一个方括号,后面是一系列的元素,以逗号分开,以一个闭方括号结束,这就是我刚才所说的。
OK. And how do I create them? Well, the representation is, following a square bracket, followed by a sequence of elements, separated by commas, followed by a closed square bracket.
应用推荐