Skip to content

Commit 205d86b

Browse files
committed
em-dashes to hyphen-minus
This fixes an old bulk change.
1 parent ed66da4 commit 205d86b

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

standard/expressions.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3609,9 +3609,9 @@ For an operation of the form `-x`, unary operator overload resolution ([§12.4.
36093609
- Integer negation:
36103610

36113611
```csharp
3612-
int operator (int x);
3613-
nint operator (nint x);
3614-
long operator (long x);
3612+
int operator -(int x);
3613+
nint operator -(nint x);
3614+
long operator -(long x);
36153615
```
36163616

36173617
The result is computed by subtracting `X` from zero. If the value of `X` is the smallest representable value of the operand type (−2³¹ for `int`, the corresponding value for `nint`, or −2⁶³ for `long`), then the mathematical negation of `X` is not representable within the operand type. If this occurs within a `checked` context, a `System.OverflowException` is thrown; if it occurs within an `unchecked` context, the result is the value of the operand and the overflow is not reported.
@@ -3624,15 +3624,15 @@ For an operation of the form `-x`, unary operator overload resolution ([§12.4.
36243624
- Floating-point negation:
36253625

36263626
```csharp
3627-
float operator (float x);
3628-
double operator (double x);
3627+
float operator -(float x);
3628+
double operator -(double x);
36293629
```
36303630

36313631
The result is the value of `X` with its sign inverted. If `x` is `NaN`, the result is also `NaN`.
36323632
- Decimal negation:
36333633

36343634
```csharp
3635-
decimal operator (decimal x);
3635+
decimal operator -(decimal x);
36363636
```
36373637

36383638
The result is computed by subtracting `X` from zero. Decimal negation is equivalent to using the unary minus operator of type `System.Decimal`.
@@ -4221,20 +4221,20 @@ The predefined subtraction operators are listed below. The operators all subtrac
42214221
- Integer subtraction:
42224222

42234223
```csharp
4224-
int operator (int x, int y);
4225-
uint operator (uint x, uint y);
4226-
nint operator (nint x, nint y);
4227-
nuint operator (nuint x, nuint y);
4228-
long operator (long x, long y);
4229-
ulong operator (ulong x, ulong y);
4224+
int operator -(int x, int y);
4225+
uint operator -(uint x, uint y);
4226+
nint operator -(nint x, nint y);
4227+
nuint operator -(nuint x, nuint y);
4228+
long operator -(long x, long y);
4229+
ulong operator -(ulong x, ulong y);
42304230
```
42314231

42324232
In a `checked` context, if the difference is outside the range of the result type, a `System.OverflowException` is thrown. In an `unchecked` context, overflows are not reported and any significant high-order bits outside the range of the result type are discarded.
42334233
- Floating-point subtraction:
42344234

42354235
```csharp
4236-
float operator (float x, float y);
4237-
double operator (double x, double y);
4236+
float operator -(float x, float y);
4237+
double operator -(double x, double y);
42384238
```
42394239

42404240
The difference is computed according to the rules of IEC 60559 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`.
@@ -4252,7 +4252,7 @@ The predefined subtraction operators are listed below. The operators all subtrac
42524252
- Decimal subtraction:
42534253

42544254
```csharp
4255-
decimal operator (decimal x, decimal y);
4255+
decimal operator -(decimal x, decimal y);
42564256
```
42574257

42584258
If the magnitude of the resulting value is too large to represent in the decimal format, a `System.OverflowException` is thrown. The scale of the result, before any rounding, is the larger of the scales of the two operands.
@@ -4262,21 +4262,21 @@ The predefined subtraction operators are listed below. The operators all subtrac
42624262
- Enumeration subtraction. Every enumeration type implicitly provides the following predefined operator, where `E` is the enum type, and `U` is the underlying type of `E`:
42634263

42644264
```csharp
4265-
U operator (E x, E y);
4265+
U operator -(E x, E y);
42664266
```
42674267

42684268
This operator is evaluated exactly as `(U)((U)x – (U)y)`. In other words, the operator computes the difference between the ordinal values of `x` and `y`, and the type of the result is the underlying type of the enumeration.
42694269

42704270
```csharp
4271-
E operator (E x, U y);
4271+
E operator -(E x, U y);
42724272
```
42734273

42744274
This operator is evaluated exactly as `(E)((U)x – y)`. In other words, the operator subtracts a value from the underlying type of the enumeration, yielding a value of the enumeration.
42754275

42764276
- Delegate removal. Every delegate type implicitly provides the following predefined operator, where `D` is the delegate type:
42774277

42784278
```csharp
4279-
D operator (D x, D y);
4279+
D operator -(D x, D y);
42804280
```
42814281

42824282
The semantics are as follows:
@@ -4529,7 +4529,7 @@ If either operand is NaN, the result is `false` for all operators except `!=`,
45294529
When neither operand is NaN, the operators compare the values of the two floating-point operands with respect to the ordering
45304530

45314531
```csharp
4532-
< max < ... < min < 0.0 == +0.0 < +min < ... < +max < +
4532+
-< -max < ... < -min < -0.0 == +0.0 < +min < ... < +max < +
45334533
```
45344534

45354535
where `min` and `max` are the smallest and largest positive finite values that can be represented in the given floating-point format. Notable effects of this ordering are:

0 commit comments

Comments
 (0)