一个^ =(B ^ = a)的? [英] a^=(b^=a); ?

查看:66
本文介绍了一个^ =(B ^ = a)的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是合法的C表达吗

a ^ =(b ^ = a);

(wrt to sequence points)?


雅科夫

解决方案



iler ... @ gmail.com写道:


这是合法的C表达式

a ^ =(b ^ = a);

(wrt to sequence points)?


雅科夫



是的,确实如此。 ^ =是一个运营商。这是非常合法的,因为

这个:

a ^ =(b = 5);


Mark


" markpapadakis" < ma *********** @ gmail.comwrites:


iler ... @ gmail.com写道:
< blockquote class =post_quotes>
>这是合法的C表达式
a ^ =(b ^ = a);
(wrt to sequence points)?
Yakov



是的,确实如此。 ^ =是一个运营商。它和/或
一样普遍合法:

a ^ =(b = 5);



你明白什么是序列点是什么?你的回答

意味着你没有。

-

只是另一个C黑客。

il*****@gmail.com 写道:


这是合法的C表达

a ^ =(b ^ = a);

(wrt to sequence points)?



在我看来,它最好是值得怀疑的,因为它既修改了

`a''并读取其先前的值而不是确定要存储的值

(它读取它以确定存储在

`b''中的值)。我可能不理解规则的全部含义,但我绝对不会认为

这段代码是正确的。

-

我知道的lusers是如此无能为力,如果他们被扼杀在线索

麝香并掉落在一堆角质线索的中间,在线索上舞会

夜晚在线索欢乐时光,他们仍然无法得到线索。

- 迈克尔戈德伍德,在修道院中


Is this legal C expression
a^=(b^=a);
(wrt to sequence points) ?

Yakov

解决方案


iler...@gmail.com wrote:

Is this legal C expression
a^=(b^=a);
(wrt to sequence points) ?

Yakov

Yes, it is. ^= is an operator. It is as legal as something as common as
this:
a^=(b = 5);

Mark


"markpapadakis" <ma***********@gmail.comwrites:

iler...@gmail.com wrote:

>Is this legal C expression
a^=(b^=a);
(wrt to sequence points) ?

Yakov


Yes, it is. ^= is an operator. It is as legal as something as common as
this:
a^=(b = 5);

Do you understand what a "sequence point" is? Your answer
implies that you do not.
--
Just another C hacker.


il*****@gmail.com writes:

Is this legal C expression
a^=(b^=a);
(wrt to sequence points) ?

In my opinion, it is at best doubtful, because it both modifies
`a'' and reads its prior value other than to determine the value
to be stored (it reads it to determine the value to store in
`b''). It is possible that I do not understand the fully
implications of the rules, but I definitely would not assume that
this code is correct.
--
"The lusers I know are so clueless, that if they were dipped in clue
musk and dropped in the middle of pack of horny clues, on clue prom
night during clue happy hour, they still couldn''t get a clue."
--Michael Girdwood, in the monastery


这篇关于一个^ =(B ^ = a)的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆