首页 > 解决方案 > C中的“h = b = out”行是什么意思

问题描述

 h = b = out;

 /* h is the number of code points that have been handled, b is the  */
 /* number of basic code points, and out is the number of ASCII code */
 /* points that have been output.                                    */

我不知道这条线是否只是一种奇怪的方式来设置hb等于outOR 如果它是一个布尔表达式,设置h等于true(0?) if bis already equal to out

标签: cvariable-assignmentassignment-operatorboolean-operations

解决方案


它将 h 和 b 设置为 out。布尔值将是h ? b : out;并且意味着如果 h 为真,则 b 否则为 - 所以它没有为 h 设置任何内容


推荐阅读