关于C和C ++运算符的维基百科文章 [英] The Wikipedia article on C and C++ operators

查看:74
本文介绍了关于C和C ++运算符的维基百科文章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这涉及维基百科关于C和C ++运算符的文章:
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B


直到最近,页面中的第一个表格非常
对C运算符的优先级有用。最近已经用C ++运算符替换了一个
。我是

对此并不满意,但我想我总是可以将

链接到历史页面。但我想知道是否有人可以看看并确认C部分是正确的。我很漂亮

确保在C后缀/前缀增量/减量中具有相同优先级的

。它在C ++中是不同的吗?


顺便说一句,这是我一直在使用的页面:
http://en.wikipedia.org/w/index.php?..oldid = 59984787


干杯

Spiros Bousbouras

This concerns the Wikipedia article on C and C++ operators:
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B

Until very recently the first table in the page was a very
useful one on the precedence of C operators. This has
recently been replaced by one on C++ operators. I''m
not at all happy with that but I guess I can always link
to the history page. But I was wondering if anyone could
have a look and verify that the C part is correct. I''m pretty
sure that in C postfix/prefix increment/decrement have
the same priority. Is it different in C++ ?

By the way here''s the page I have been using:
http://en.wikipedia.org/w/index.php?...oldid=59984787

Cheers
Spiros Bousbouras

推荐答案

[后续设置为comp.lang.c]

sp **** @ gmail.com 说:


< snip>
[Followups set to comp.lang.c]

sp****@gmail.com said:

<snip>

但我想知道是否有人可以

查看并验证[维基文章]的C部分是否正确。
But I was wondering if anyone could
have a look and verify that the C part [of a Wiki article] is correct.



没有意义。即使它今天恰好是正确的,今晚也可能会错误的是




-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上面的域名(但显然放弃了www)

No point. Even if it happens to be correct today, it could be wrong again by
this evening.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)


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

...

我很漂亮

确保在C后缀/前缀增量/减量中具有相同优先级的

。它在C ++中是不同的吗?

...
...
I''m pretty
sure that in C postfix/prefix increment/decrement have
the same priority. Is it different in C++ ?
...



这是什么意思?究竟是什么具有相同的优先级?


例如,前缀增量和前缀减少在

C和C ++中具有相同的优先级,但这并不重要,因为没有

上下文,因为它们都很重要(因为两者都是_prefix_)。这同样适用于

后缀运算符。


当谈到一元运算符时,优先级问题也是如此。仅当我们将
比较前缀运算符和后缀运算符时才存在。在C和C ++中,后缀一元

运算符通常比前缀运算符具有更高的优先级。


-

祝你好运,

Andrey Tarasevich

What do you mean by this? What exactly has "the same priority"?

Prefix increment and prefix decrement, for example, do have the same priority in
both C and C++, but this is not really something important because there is no
context where it would matter (since both are _prefix_). The same applies to
postfix operators.

When it comes to unary operators, the issue of "priority" only exists when we
compare a prefix operator to a postfix one. And in both C and C++ postfix unary
operators normally have higher priority than prefix ones.

--
Best regards,
Andrey Tarasevich


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

这涉及维基百科关于C和C ++运算符的文章:
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B


直到最近,页面中的第一个表格对于C运算符的优先级是非常有用的。最近已经用C ++运算符替换了一个
。我是

对此并不满意,但我想我总是可以将

链接到历史页面。但我想知道是否有人可以看看并确认C部分是正确的。我很漂亮

确保在C后缀/前缀增量/减量中具有相同优先级的

。它在C ++中是不同的吗?
This concerns the Wikipedia article on C and C++ operators:
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B

Until very recently the first table in the page was a very
useful one on the precedence of C operators. This has
recently been replaced by one on C++ operators. I''m
not at all happy with that but I guess I can always link
to the history page. But I was wondering if anyone could
have a look and verify that the C part is correct. I''m pretty
sure that in C postfix/prefix increment/decrement have
the same priority. Is it different in C++ ?



在C ++中,postfix的优先级高于前缀。表格似乎很好

那里。

我确信在C中它是一样的。


存在循环依赖在三元和任务之间,表格

只是

无法反映出来。

In C++ postfix has higher precedence than prefix. The table seems fine
there.
I am certain that in C it is the same.

There is a circular dependency between ternary and assignment, the table
simply
cannot reflect that.


顺便说一下这里''我一直在使用的页面:
http://en.wikipedia.org/w/index.php?..oldid=59984787



这是错误的。


V

-

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

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

That would be wrong.

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


这篇关于关于C和C ++运算符的维基百科文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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