12.3.3.20 General rules for expressions with embedded expressions

博客介绍了嵌入式表达式的通用规则,涉及括号表达式、元素访问表达式等多种类型。每种表达式有一个或多个子表达式,按固定顺序无条件求值,还说明了表达式中变量的确定赋值状态在不同阶段的情况。
12.3.3.20 General rules for expressions with embedded expressions
The following rules apply to these kinds of expressions: parenthesized
expressions (?4.5.3), element access
expressions (?4.5.6), base access expressions with indexing (?4.5.8),
increment and decrement
expressions (?4.5.9, ?4.6.5), cast expressions (?4.6.6), unary +, -, ~,
* expressions, binary +, -, *, /, %,
<<, >>, <, <=, >, >=, ==, !=, is, as, &, |, ^ expressions (?4.7, ?4.8, ?4.
9, ?4.10), compound
Chapter 12 Variables
109
assignment expressions (?4.13.2), checked and unchecked expressions (?4.5.1
2), array and delegate
creation expressions (?4.5.10).
Each of these expressions has one or more sub-expressions that are
unconditionally evaluated in a fixed
order. [Example: For example, the binary % operator evaluates the left hand
side of the operator, then the
right hand side. An indexing operation evaluates the indexed expression,
and then evaluates each of the
index expressions, in order from left to right. end example] For an
expression expr, which has subexpressions
expr1, expr2, ..., exprn, evaluated in that order:
?The definite assignment state of v at the beginning of expr1 is the same
as the definite assignment
state at the beginning of expr.
?The definite assignment state of v at the beginning of expri (i greater
than one) is the same as the
definite assignment state at the end of expri-1.
?The definite assignment state of v at the end of expr is the same as the
definite assignment state at
the end of exprn.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值