12.3.3.7 While statements

博客围绕while语句展开,阐述了变量v在while语句不同位置的确定赋值状态。包括在表达式开始时与语句开始时状态相同,以及根据表达式结束时v的不同赋值状态,分析其在控制流转移到循环体和语句终点时的赋值情况。
12.3.3.7 While statements
For a while statement stmt of the form:
while (expr) while-body
?v has the same definite assignment state at the beginning of expr as at
the beginning of stmt.
?If v is definitely assigned at the end of expr, then it is definitely
assigned on the control flow transfer
to while-body and to the end point of stmt.
?If v has the state .definitely assigned after true expression. at the end
of expr, then it is definitely
assigned on the control flow transfer to while-body, but not definitely
assigned at the end-point of
stmt.
?If v has the state .definitely assigned after false expression. at the
end of expr, then it is definitely
assigned on the control flow transfer to the end point of stmt.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值