X hits on this document

1088 views

0 shares

0 downloads

0 comments

109 / 396

C# LANGUAGE SPECIFICATION

The definite assignment state of v before expr-false is definitely assigned if and only if 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:

If expr-cond is a constant expression (§‎7.15) with value true then the state of v after expr is the same as the state of v after expr-true.

Otherwise, if expr-cond is a constant expression (§‎7.15) with value false then the state of v after expr is the same as the state of v after expr-false.

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.

Otherwise, the state of v after expr is not definitely assigned.

5.4 Variable references

A variable-reference is an expression that is classified as a variable. A variable-reference denotes a storage location that can be accessed both to fetch the current value and to store a new value.

variable-reference: expression

In C and C++, a variable-reference is known as an lvalue.

5.5 Atomicity of variable references

Reads and writes of the following data types are atomic: bool, char, byte, sbyte, short, ushort, uint, int, float, and reference types. In addition, reads and writes of enum types with an underlying type in the previous list are also atomic. Reads and writes of other types, including long, ulong, double, and decimal, as well as user-defined types, are not guaranteed to be atomic. Aside from the library functions designed for that purpose, there is no guarantee of atomic read-modify-write, such as in the case of increment or decrement.

96Copyright Microsoft Corporation 1999-2003. All Rights Reserved.

Document info
Document views1088
Page views1088
Page last viewedSun Dec 11 08:33:27 UTC 2016
Pages396
Paragraphs9401
Words133190

Comments