Suppose that an assignment expression a =
b, a &=
b, a |=
b, or a ^=
b is boolean-
valued.
=
b when true iff either a is V or V is definitely assigned after the right-hand operand expression when true.
=
b when false iff either a is V or V is definitely assigned after the right-hand operand expression when false.
&=
b when true iff either a is V or V would be definitely assigned after a &
b (in the same context) when true.
&=
b when false iff either a is V or V would be definitely assigned after a &
b (in the same context) when false.
|=
b when true iff either a is V or V would be definitely assigned after a |
b (in the same context) when true.
|=
b when false iff either a is V or V would be definitely assigned after a |
b (in the same context) when false.
^=
b when true iff either a is V or V would be definitely assigned after a ^
b (in the same context) when true.
^=
b when false iff either a is V or V would be definitely assigned after a ^
b (in the same context) when false.
Note that if a is V and V is not definitely assigned before a compound assignment such as a &=
b, then a compile-time error will necessarily occur. The rules stated above include the disjunct "a is V" so that V will be considered to have been definitely assigned at later points in the code. Including the disjunct "a is V" does not affect the binary decision as to whether a program is acceptable or will result in a compile-time error, but it affects how many different points in the code may be regarded as erroneous, and so in practice it can improve the quality of error reporting.