Redian新闻
>
请问 a+ = 2 与 a= a+2的区别
avatar
请问 a+ = 2 与 a= a+2的区别# Programming - 葵花宝典
x*r
1
suppose是C code
a + = 2 与 a= a+2
这两句转成汇编码后有啥区别?
谢谢
avatar
q*n
2
hmm, is a+=2 still considered as a better style nowadays?
avatar
p*f
3

Is "a + = 2" valid c code? I will discuss "a += 2" now.
"a += 2" evaluates "a" once, while "a = a+2" evaluates "a" twice.
This should make no difference normally, unless "a" is something
strange, such as a macro.

【在 x******r 的大作中提到】
: suppose是C code
: a + = 2 与 a= a+2
: 这两句转成汇编码后有啥区别?
: 谢谢

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。