Skip to content

Commit 3dc9980

Browse files
committed
misc formatting fixes
1. Fixed missing opening backtick on `System.IntPtr`. 2. Fixed grammar from "In context if type resolution (§7.8.1) on either of these names succeeds then that name shall be recognised" to "If type resolution (§7.8.1) on either of these names succeeds, that name shall be recognised". 3. Added "native signed precision, or native unsigned precision" to the operator precision list, and added a note clarifying that native precision means 32-bit or 64-bit depending on platform and that nint/nuint operators use native precision rather than being promoted.
1 parent a68184a commit 3dc9980

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

standard/types.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ nullable_value_type
217217
;
218218
```
219219

220-
Because the names `nint` and `nuint` are not keywords there is syntactic ambiguity between recognising them as a *type_name* or a *value_type*. In context if type resolution (§7.8.1) on either of these names succeeds then that name shall be recognised as a *type_name*; otherwise it shall be recognised as a *value_type*.
220+
Because the names `nint` and `nuint` are not keywords there is syntactic ambiguity between recognising them as a *type_name* or a *value_type*. If type resolution (§7.8.1) on either of these names succeeds, that name shall be recognised as a *type_name*; otherwise it shall be recognised as a *value_type*.
221221

222222
Unlike a variable of a reference type, a variable of a value type can contain the value `null` only if the value type is a nullable value type ([§8.3.12](types.md#8312-nullable-value-types)). For every non-nullable value type there is a corresponding nullable value type denoting the same set of values plus the value `null`.
223223

@@ -323,7 +323,7 @@ Every simple type has members. Each simple type that is an alias for a predefine
323323
324324
The types `nint` and `nuint` are represented by the types `System.IntPtr` and `System.UIntPtr`, respectively, and are *not* aliases for these types. In this context being *represented by* means:
325325
326-
- The only members directly accessible for `nint` and `nuint` are the required methods of `Object` ([§C.2](standard-library.md#c2-standard-library-types-defined-in-isoiec-23271)). Any other members of System.IntPtr` and `System.UIntPtr` may be accessed via those types.
326+
- The only members directly accessible for `nint` and `nuint` are the required methods of `Object` ([§C.2](standard-library.md#c2-standard-library-types-defined-in-isoiec-23271)). Any other members of `System.IntPtr` and `System.UIntPtr` may be accessed via those types.
327327
- Operations performed through `dynamic` binding on `System.IntPtr` and `System.UIntPtr` values do not have access to the `nint` and `nuint` operators.
328328
- In all other respects `nint` and `nuint` behave as if they are aliases of `System.IntPtr` and `System.UIntPtr`.
329329
@@ -346,7 +346,9 @@ C# supports the following integral types, with the sizes and value ranges, as sh
346346
347347
All signed integral types are represented using twos complement format.
348348
349-
The *integral_type* unary and binary operators always operate with signed 32-bit precision, unsigned 32-bit precision, signed 64-bit precision, or unsigned 64-bit precision, as detailed in [§12.4.7](expressions.md#1247-numeric-promotions).
349+
The *integral_type* unary and binary operators always operate with signed 32-bit precision, unsigned 32-bit precision, signed 64-bit precision, unsigned 64-bit precision, native signed precision, or native unsigned precision, as detailed in [§12.4.7](expressions.md#1247-numeric-promotions).
350+
351+
> *Note*: Native precision means 32-bit on 32-bit platforms and 64-bit on 64-bit platforms. Operators on `nint` and `nuint` use native precision rather than being promoted to a larger type. *end note*
350352
351353
The `char` type is classified as an integral type, but it differs from the other integral types in two ways:
352354

0 commit comments

Comments
 (0)