diff --git a/proposals/csharp-9.0/init.md b/proposals/csharp-9.0/init.md index 5ef3298..588d58e 100644 --- a/proposals/csharp-9.0/init.md +++ b/proposals/csharp-9.0/init.md @@ -1,5 +1,4 @@ -Init Only Setters -===== +# Init Only Setters ## Summary This proposal adds the concept of init only properties and indexers to C#. diff --git a/spec/exceptions.md b/spec/exceptions.md index 1dbf1d6..c4cfa1f 100644 --- a/spec/exceptions.md +++ b/spec/exceptions.md @@ -41,7 +41,7 @@ Exceptions that occur during destructor execution are worth special mention. If The following exceptions are thrown by certain C# operations. -| | | +| Exception type | Description | |--------------------------------------|----------------| | `System.ArithmeticException` | A base class for exceptions that occur during arithmetic operations, such as `System.DivideByZeroException` and `System.OverflowException`. | | `System.ArrayTypeMismatchException` | Thrown when a store into an array fails because the actual type of the stored element is incompatible with the actual type of the array. | diff --git a/spec/expressions.md b/spec/expressions.md index 035dd24..6314184 100644 --- a/spec/expressions.md +++ b/spec/expressions.md @@ -2700,16 +2700,15 @@ The predefined multiplication operators are listed below. The operators all comp The product is computed according to the rules of IEEE 754 arithmetic. The following table lists the results of all possible combinations of nonzero finite values, zeros, infinities, and NaN's. In the table, `x` and `y` are positive finite values. `z` is the result of `x * y`. If the result is too large for the destination type, `z` is infinity. If the result is too small for the destination type, `z` is zero. - | | | | | | | | | - |:----:|-----:|:----:|:---:|:---:|:----:|:----:|:----| - | | +y | -y | +0 | -0 | +inf | -inf | NaN | - | +x | +z | -z | +0 | -0 | +inf | -inf | NaN | - | -x | -z | +z | -0 | +0 | -inf | +inf | NaN | - | +0 | +0 | -0 | +0 | -0 | NaN | NaN | NaN | - | -0 | -0 | +0 | -0 | +0 | NaN | NaN | NaN | - | +inf | +inf | -inf | NaN | NaN | +inf | -inf | NaN | - | -inf | -inf | +inf | NaN | NaN | -inf | +inf | NaN | - | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | + | | +y | -y | +0 | -0 | +inf | -inf | NaN | + |:--------:|-----:|:----:|:---:|:---:|:----:|:----:|:----| + | **+x** | +z | -z | +0 | -0 | +inf | -inf | NaN | + | **-x** | -z | +z | -0 | +0 | -inf | +inf | NaN | + | **+0** | +0 | -0 | +0 | -0 | NaN | NaN | NaN | + | **-0** | -0 | +0 | -0 | +0 | NaN | NaN | NaN | + | **+inf** | +inf | -inf | NaN | NaN | +inf | -inf | NaN | + | **-inf** | -inf | +inf | NaN | NaN | -inf | +inf | NaN | + | **NaN** | NaN | NaN | NaN | NaN | NaN | NaN | NaN | * Decimal multiplication: @@ -2752,16 +2751,15 @@ The predefined division operators are listed below. The operators all compute th The quotient is computed according to the rules of IEEE 754 arithmetic. The following table lists the results of all possible combinations of nonzero finite values, zeros, infinities, and NaN's. In the table, `x` and `y` are positive finite values. `z` is the result of `x / y`. If the result is too large for the destination type, `z` is infinity. If the result is too small for the destination type, `z` is zero. - | | | | | | | | | - |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| - | | +y | -y | +0 | -0 | +inf | -inf | NaN | - | +x | +z | -z | +inf | -inf | +0 | -0 | NaN | - | -x | -z | +z | -inf | +inf | -0 | +0 | NaN | - | +0 | +0 | -0 | NaN | NaN | +0 | -0 | NaN | - | -0 | -0 | +0 | NaN | NaN | -0 | +0 | NaN | - | +inf | +inf | -inf | +inf | -inf | NaN | NaN | NaN | - | -inf | -inf | +inf | -inf | +inf | NaN | NaN | NaN | - | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | + | | +y | -y | +0 | -0 | +inf | -inf | NaN | + |:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| + | **+x** | +z | -z | +inf | -inf | +0 | -0 | NaN | + | **-x** | -z | +z | -inf | +inf | -0 | +0 | NaN | + | **+0** | +0 | -0 | NaN | NaN | +0 | -0 | NaN | + | **-0** | -0 | +0 | NaN | NaN | -0 | +0 | NaN | + | **+inf** | +inf | -inf | +inf | -inf | NaN | NaN | NaN | + | **-inf** | -inf | +inf | -inf | +inf | NaN | NaN | NaN | + | **NaN** | NaN | NaN | NaN | NaN | NaN | NaN | NaN | * Decimal division: @@ -2802,16 +2800,15 @@ The predefined remainder operators are listed below. The operators all compute t The following table lists the results of all possible combinations of nonzero finite values, zeros, infinities, and NaN's. In the table, `x` and `y` are positive finite values. `z` is the result of `x % y` and is computed as `x - n * y`, where `n` is the largest possible integer that is less than or equal to `x / y`. This method of computing the remainder is analogous to that used for integer operands, but differs from the IEEE 754 definition (in which `n` is the integer closest to `x / y`). - | | | | | | | | | - |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| - | | +y | -y | +0 | -0 | +inf | -inf | NaN | - | +x | +z | +z | NaN | NaN | x | x | NaN | - | -x | -z | -z | NaN | NaN | -x | -x | NaN | - | +0 | +0 | +0 | NaN | NaN | +0 | +0 | NaN | - | -0 | -0 | -0 | NaN | NaN | -0 | -0 | NaN | - | +inf | NaN | NaN | NaN | NaN | NaN | NaN | NaN | - | -inf | NaN | NaN | NaN | NaN | NaN | NaN | NaN | - | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | + | | +y | -y | +0 | -0 | +inf | -inf | NaN | + |:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| + | **+x** | +z | +z | NaN | NaN | x | x | NaN | + | **-x** | -z | -z | NaN | NaN | -x | -x | NaN | + | **+0** | +0 | +0 | NaN | NaN | +0 | +0 | NaN | + | **-0** | -0 | -0 | NaN | NaN | -0 | -0 | NaN | + | **+inf** | NaN | NaN | NaN | NaN | NaN | NaN | NaN | + | **-inf** | NaN | NaN | NaN | NaN | NaN | NaN | NaN | + | **NaN** | NaN | NaN | NaN | NaN | NaN | NaN | NaN | * Decimal remainder: @@ -2850,15 +2847,14 @@ The predefined addition operators are listed below. For numeric and enumeration The sum is computed according to the rules of IEEE 754 arithmetic. The following table lists the results of all possible combinations of nonzero finite values, zeros, infinities, and NaN's. In the table, `x` and `y` are nonzero finite values, and `z` is the result of `x + y`. If `x` and `y` have the same magnitude but opposite signs, `z` is positive zero. If `x + y` is too large to represent in the destination type, `z` is an infinity with the same sign as `x + y`. - | | | | | | | | - |:----:|:----:|:----:|:----:|:----:|:----:|:----:| - | | y | +0 | -0 | +inf | -inf | NaN | - | x | z | x | x | +inf | -inf | NaN | - | +0 | y | +0 | +0 | +inf | -inf | NaN | - | -0 | y | +0 | -0 | +inf | -inf | NaN | - | +inf | +inf | +inf | +inf | +inf | NaN | NaN | - | -inf | -inf | -inf | -inf | NaN | -inf | NaN | - | NaN | NaN | NaN | NaN | NaN | NaN | NaN | + | | y | +0 | -0 | +inf | -inf | NaN | + |:--------:|:----:|:----:|:----:|:----:|:----:|:----:| + | **x** | z | x | x | +inf | -inf | NaN | + | **+0** | y | +0 | +0 | +inf | -inf | NaN | + | **-0** | y | +0 | -0 | +inf | -inf | NaN | + | **+inf** | +inf | +inf | +inf | +inf | NaN | NaN | + | **-inf** | -inf | -inf | -inf | NaN | -inf | NaN | + | **NaN** | NaN | NaN | NaN | NaN | NaN | NaN | * Decimal addition: @@ -2943,15 +2939,14 @@ The predefined subtraction operators are listed below. The operators all subtrac The difference is computed according to the rules of IEEE 754 arithmetic. The following table lists the results of all possible combinations of nonzero finite values, zeros, infinities, and NaNs. In the table, `x` and `y` are nonzero finite values, and `z` is the result of `x - y`. If `x` and `y` are equal, `z` is positive zero. If `x - y` is too large to represent in the destination type, `z` is an infinity with the same sign as `x - y`. - | | | | | | | | - |:----:|:----:|:----:|:----:|:----:|:----:|:---:| - | | y | +0 | -0 | +inf | -inf | NaN | - | x | z | x | x | -inf | +inf | NaN | - | +0 | -y | +0 | +0 | -inf | +inf | NaN | - | -0 | -y | -0 | +0 | -inf | +inf | NaN | - | +inf | +inf | +inf | +inf | NaN | +inf | NaN | - | -inf | -inf | -inf | -inf | -inf | NaN | NaN | - | NaN | NaN | NaN | NaN | NaN | NaN | NaN | + | | y | +0 | -0 | +inf | -inf | NaN | + |:--------:|:----:|:----:|:----:|:----:|:----:|:---:| + | **x** | z | x | x | -inf | +inf | NaN | + | **+0** | -y | +0 | +0 | -inf | +inf | NaN | + | **-0** | -y | -0 | +0 | -inf | +inf | NaN | + | **+inf** | +inf | +inf | +inf | NaN | +inf | NaN | + | **-inf** | -inf | -inf | -inf | -inf | NaN | NaN | + | **NaN** | NaN | NaN | NaN | NaN | NaN | NaN | * Decimal subtraction: diff --git a/spec/introduction.md b/spec/introduction.md index 8b10d4b..7dd191f 100644 --- a/spec/introduction.md +++ b/spec/introduction.md @@ -131,7 +131,7 @@ C#'s value types are further divided into ***simple types***, ***enum types***, The following table provides an overview of C#'s type system. -| __Category__ | | __Description__ | +| __Category__ | __Types__ | __Description__ | |-----------------|-----------------|-----------------| | Value types | Simple types | Signed integral: `sbyte`, `short`, `int`, `long` | | | | Unsigned integral: `byte`, `ushort`, `uint`, `ulong` |