x = 0; x + = ++ x + x ++; x == 4? [英] x = 0; x += ++x + x++; x == 4?

查看:81
本文介绍了x = 0; x + = ++ x + x ++; x == 4?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




是这个标准定义的结果吗?


我只是在一个小小的战斗中。与一些同事谈论这个话题。所以来自更多参与者的答案可以提供帮助。


问候,

Christian

Hi,

is this result defined by the standard?

I''m just in a small "fight" with some workmates on this topic. So an
answer from more involved people could help.

Regards,
Christian

推荐答案

Christian Johannes Charbula写道:
Christian Johannes Charbula wrote:

这个结果是由标准定义的?
is this result defined by the standard?



否。第二个语句包含规则

被破坏的表达式。参见标准,[expr] / 4.

No. The second statement contains the expression in which the rules
are broken. See the Standard, [expr]/4.


我只是在一个小小的战斗中。与一些同事谈论这个话题。所以来自更多参与者的答案可以提供帮助。
I''m just in a small "fight" with some workmates on this topic. So an
answer from more involved people could help.



永远不要和你的同事打架。这对你的职业生涯不利。


V

-

请删除大写''A'的时候通过电子邮件回复

我没有回复最热门的回复,请不要问

Never fight your workmates. It''s detrimental to your career.

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


Pete Becker schrieb:
Pete Becker schrieb:

但是,一个更重要的问题是谁在乎?是不是真的花了很多时间来讨论

表达式的假设含义,这种表达式永远不会出现在现实世界的代码中?即使在

Java的规则下,结果也很明确,代码是可恶的。
A more important question, though, is "who cares?" Is it really
worhwhile spending time talking about the hypothetical meaning of an
expression that should never appear in real-world code? Even under
Java''s rules, where the result is well defined, the code is abominable.



确切地说,我完全排在第二位。我完全不明白为什么这个确切的

问题出现在这个组中(并且在comp.lang.c中,也是BTW)每隔几天就会出现这个问题。有点烦人。你应该认为人们有更重要的问题。


问候,

Johannes


-

" PS:Ein Realname w?¤renett。 Ich selbst nutze nur keinen,weil mich die

meisten hier bereits mit Namen kennen。 - Markus Gronotte aka Makus /

Kosst Amojan / maqqusz / G / Ferdinand Simpson先生/ Quartillia

Rosenberg in dse< 45 ******** **************@newsspool3.arcor-online.net>

Exactly, I fully second that. I do not understand at all why this exact
question comes up in this group (and in comp.lang.c, too, BTW) every few
days. Kind of annoying. You should think people have more important
problems.

Regards,
Johannes

--
"PS: Ein Realname w?¤re nett. Ich selbst nutze nur keinen, weil mich die
meisten hier bereits mit Namen kennen." -- Markus Gronotte aka Makus /
Kosst Amojan / maqqusz / Mr. G / Ferdinand Simpson / Quartillia
Rosenberg in dse <45**********************@newsspool3.arcor-online.net>


Johannes Bauer写道:
Johannes Bauer wrote:

Pete Becker schrieb:
Pete Becker schrieb:

>然而,一个更重要的问题是谁在乎?是不是真的花时间谈论一个永远不会出现在真实世界代码中的表达式的假设含义?即使在Java的规则下,结果定义良好,代码也是可恶的。
>A more important question, though, is "who cares?" Is it really
worhwhile spending time talking about the hypothetical meaning of an
expression that should never appear in real-world code? Even under
Java''s rules, where the result is well defined, the code is
abominable.



确切地说,我完全排在第二位。我完全不明白为什么这个

确切的问题出现在这个组中(并且在comp.lang.c中,BTW)

每隔几天。有点烦人。你应该认为人们有更多的重要问题。


Exactly, I fully second that. I do not understand at all why this
exact question comes up in this group (and in comp.lang.c, too, BTW)
every few days. Kind of annoying. You should think people have more
important problems.



噢,那些成年人及其更重要的问题!什么时候

会明白吗? < g>


V

-

请在通过电子邮件回复时删除资金''A'

我没有回复最热门的回复,请不要问

Aw, those grown-ups and their "more important problems"! When
will they understand? <g>

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


这篇关于x = 0; x + = ++ x + x ++; x == 4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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