Expressions. For an expression expr of the form expr-cond ?
For an expression expr of the form expr-cond? expr-true: expr-false: · The definite assignment state of v before expr-cond is the same as the state of v before expr. · The definite assignment state of v before expr-true is definitely assigned if and only if one of the following holds: o expr-cond is a constant expression with the value false o the state of v after expr-cond is definitely assigned or “definitely assigned after true expression”. · The definite assignment state of v before expr-false is definitely assigned if and only if one of the following holds: o expr-cond is a constant expression with the value true · the state of v after expr-cond is definitely assigned or “definitely assigned after false expression”. · The definite assignment state of v after expr is determined by: o If expr-cond is a constant expression (§7.19) with value true then the state of v after expr is the same as the state of v after expr-true. o Otherwise, if expr-cond is a constant expression (§7.19) with value false then the state of v after expr is the same as the state of v after expr-false. o Otherwise, if the state of v after expr-true is definitely assigned and the state of v after expr-false is definitely assigned, then the state of v after expr is definitely assigned. o Otherwise, the state of v after expr is not definitely assigned.
|