12.3.3.21 Invocation expressions and object creation expressions

博客围绕调用表达式和对象创建表达式展开,阐述了变量在不同表达式中的确定赋值状态。如调用表达式中,变量在主表达式前和表达式前状态相同;对象创建表达式中,变量在第一个参数前和表达式前状态相同等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

12.3.3.21 Invocation expressions and object creation expressions
For an invocation expression expr of the form:
primary-expression (arg1, arg2, ? argn)
or an object creation expression of the form:
new type (arg1, arg2, ? argn)
?For an invocation expression, the definite assignment state of v before
primary-expression is the
same as the state of v before expr.
?For an invocation expression, the definite assignment state of v before
arg1 is the same as the state of
v after primary-expression.
?For an object creation expression, the definite assignment state of v
before arg1 is the same as the
state of v before expr.
?For each argument argi, the definite assignment state of v after argi is
determined by the normal
expression rules, ignoring any ref or out modifiers.
?For each argument argi for any i greater than one, the definite
assignment state of v before argi is the
same as the state of v after argi-1.
?If the variable v is passed as an out argument (i.e., an argument of the
form .out v.) in any of the
arguments, then the state of v after expr is definitely assigned.
Otherwise; the state of v after expr is
the same as the state of v after argn.
--
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值