您的位置:首页 > 其它

为什么喜欢在 if() 条件判断中使用逗号操作符?

2011-09-29 21:16 731 查看
//再一次遇到 if() 的条件判断中使用逗号操作符,此人必定蛋疼。

//举个栗子

,表示鄙视


#define get_buffer(pst,data) (((pst)->top == (pst)->end)? 0 : (( data = (pst)->pst[(pst)->end++]),1))

if( get_buffer( &glb->rcv_buff[num], data))

{

}

== (pst)->top != (pst)->end

if( ((data = (pst)->pst[(pst)->end++]),1) )

{

}

==

data = (pst)->pst[(pst)->end++];

if(1)

{

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐