免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: pengjianbokobe

int a =++i+++i;这个是未定义的吗? [复制链接]

论坛徽章:
2
程序设计版块每日发帖之星
日期:2015-06-17 22:20:00每日论坛发贴之星
日期:2015-06-17 22:20:00
发表于 2011-06-24 17:27 |显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
27
CU大牛徽章
日期:2013-03-13 15:15:08CU大牛徽章
日期:2013-05-20 10:46:38CU大牛徽章
日期:2013-05-20 10:46:44CU大牛徽章
日期:2013-09-18 15:24:09CU大牛徽章
日期:2013-09-18 15:24:20CU大牛徽章
日期:2013-09-18 15:24:25CU大牛徽章
日期:2013-09-18 15:24:31CU大牛徽章
日期:2013-09-18 15:24:36CU大牛徽章
日期:2013-09-18 15:24:41CU大牛徽章
日期:2013-09-18 15:24:48CU大牛徽章
日期:2013-09-18 15:24:52处女座
日期:2013-09-27 17:45:43
发表于 2011-06-25 21:55 |显示全部楼层
这样写的人该踢

论坛徽章:
89
水瓶座
日期:2014-04-01 08:53:31天蝎座
日期:2014-04-01 08:53:53天秤座
日期:2014-04-01 08:54:02射手座
日期:2014-04-01 08:54:15子鼠
日期:2014-04-01 08:55:35辰龙
日期:2014-04-01 08:56:36未羊
日期:2014-04-01 08:56:27戌狗
日期:2014-04-01 08:56:13亥猪
日期:2014-04-01 08:56:02亥猪
日期:2014-04-08 08:38:58程序设计版块每日发帖之星
日期:2016-01-05 06:20:00程序设计版块每日发帖之星
日期:2016-01-07 06:20:00
发表于 2011-06-27 10:43 |显示全部楼层
这是一个欠抽的**行为。

没有人在实际中这么写。

论坛徽章:
0
发表于 2011-06-27 15:49 |显示全部楼层
回复 2# pmerofc


    还左值?
没有过Left-Value, 只有Location-Value
锈逗了

论坛徽章:
0
发表于 2011-06-27 16:25 |显示全部楼层
回复  pmerofc


    还左值?
没有过Left-Value, 只有Location-Value
锈逗了
扫地大妈 发表于 2011-06-27 15:49



既没有左值,也没有右值。没有 Left-Value,也没有 Location-Value。只有 lvalue 和非 lvalue,满意了不?

如果你认为 lvalue 指的是 Location-Value,请给出你的论据。

论坛徽章:
2
青铜圣斗士
日期:2015-11-26 06:15:59数据库技术版块每日发帖之星
日期:2016-07-24 06:20:00
发表于 2011-06-27 17:40 |显示全部楼层
本帖最后由 OwnWaterloo 于 2011-06-27 17:41 编辑

为了防止某秀逗君妖言惑众, 次将相关条款贴在就近位置:

c99 6.3.2.1 Lvalues, arrays, and function designators
53 )
The name ‘‘lvalue’’ comes originally from the assignment expression E1 = E2,
in which the left operand E1 is required to be a (modifiable) lvalue.
It is perhaps better considered as representing an object ‘‘locator value’’.
What is sometimes called ‘‘rvalue’’ is in this International Standard described as the ‘‘value of an expression’’.

c89 6.2.2.1 Lvalues and function designators
31 )
The name ``lvalue'' comes originally from the assignment expression E1 = E2 ,
in which the left operand E1 must be a (modifiable) lvalue.
It is perhaps better considered as representing an object ``locator value.''
What is sometimes called ``rvalue'' is in this Standard described as the ``value of an expression.''


1. 没有 left-value 与 right-value
2. 也没有location-value
3. 只有 lvalue(locator value) 与 rvalue
4. 中文如何翻译? 这就见仁见智了。
左值/右值?  还是 位置值/表达式值?

论坛徽章:
2
程序设计版块每日发帖之星
日期:2015-06-17 22:20:00每日论坛发贴之星
日期:2015-06-17 22:20:00
发表于 2011-06-28 07:50 |显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP