Operator Precedence vs Order of Evaluation

后端 未结 6 1400
悲&欢浪女
悲&欢浪女 2020-11-22 06:38

The terms \'operator precedence\' and \'order of evaluation\' are very commonly used terms in programming and extremely important for a programmer to know. And, as far as I

6条回答
  •  盖世英雄少女心
    2020-11-22 07:15

    It mentions "Expressions with higher-precedence operators are evaluated first."

    I am just going to repeat what I said here. As far as standard C and C++ are concerned that article is flawed. Precedence only affects which tokens are considered to be the operands of each operator, but it does not affect in any way the order of evaluation.

    So, the link only explains how Microsoft implemented things, not how the language itself works.

提交回复
热议问题