From a4c9db9a69ae0d1334ed5675e8faca3b7574c0a1 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Mon, 23 Aug 2021 14:33:02 -0400 Subject: [PATCH] Address docs build warnings (#5102) * fix docs suggestions There are two different types of changes in this PR: - H1s should use ATX headers (`#`) - tables should have a header row that is not empty. * replace docs links with source This addresses another docs build warning. The docs build system flags absolute links to the pages on docs.microsoft.com as warnings, which should be replaced with relative links. This fix changes the link to the source doc on GitHub. I'm currently looking for a better solution. * Revert "replace docs links with source" This reverts commit b40cfc96328d37335c6b59ffd0f35f9b99fbdeae. --- proposals/csharp-9.0/init.md | 3 +- spec/exceptions.md | 2 +- spec/expressions.md | 91 +++++++++++++++++------------------- spec/introduction.md | 2 +- 4 files changed, 46 insertions(+), 52 deletions(-) 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` |