Skip to content

Commit 7073081

Browse files
authored
Clarify F# basic types (#6372)
* Clarify F# basic types * Redirect, xrefs, feedback
1 parent 1803b4d commit 7073081

File tree

5 files changed

+42
-40
lines changed

5 files changed

+42
-40
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,11 @@
13331333
{
13341334
"source_path":"docs/visual-basic/programming-guide/concepts/threading/thread-timers.md",
13351335
"redirect_url":"/dotnet/standard/threading/timers"
1336+
},
1337+
{
1338+
"source_path":"docs/fsharp/language-reference/primitive-types.md",
1339+
"redirect_url":"/dotnet/fsharp/language-reference/basic-types",
1340+
"redirect_document_id": true
13361341
}
13371342
]
13381343
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Basic Types (F#)
3+
description: Discover the fundamental basic types that are used in the F# language.
4+
ms.date: 07/09/2018
5+
---
6+
# Basic types
7+
8+
This topic lists the basic types that are defined in the F# language. These types are the most fundamental in F#, forming the basis of nearly every F# program. They are a superset of .NET primitive types.
9+
10+
|Type|.NET type|Description|
11+
|----|---------|-----------|
12+
|`bool`|<xref:System.Boolean>|Possible values are `true` and `false`.|
13+
|`byte`|<xref:System.Byte>|Values from 0 to 255.|
14+
|`sbyte`|<xref:System.SByte>|Values from -128 to 127.|
15+
|`int16`|<xref:System.Int16>|Values from -32768 to 32767.|
16+
|`uint16`|<xref:System.UInt16>|Values from 0 to 65535.|
17+
|`int`|<xref:System.Int32>|Values from -2,147,483,648 to 2,147,483,647.|
18+
|`uint32`|<xref:System.UInt32>|Values from 0 to 4,294,967,295.|
19+
|`int64`|<xref:System.Int64>|Values from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.|
20+
|`uint64`|<xref:System.UInt64>|Values from 0 to 18,446,744,073,709,551,615.|
21+
|`nativeint`|<xref:System.IntPtr>|A native pointer as a signed integer.|
22+
|`unativeint`|<xref:System.UIntPtr>|A native pointer as an unsigned integer.|
23+
|`char`|<xref:System.Char>|Unicode character values.|
24+
|`string`|<xref:System.String>|Unicode text.|
25+
|`decimal`|<xref:System.Decimal>|A floating point data type that has at least 28 significant digits.|
26+
|`unit`|not applicable|Indicates the absence of an actual value. The type has only one formal value, which is denoted `()`. The unit value, `()`, is often used as a placeholder where a value is needed but no real value is available or makes sense.|
27+
|`void`|<xref:System.Void>|Indicates no type or value.|
28+
|`float32`, `single`|<xref:System.Single>|A 32-bit floating point type.|
29+
|`float`, `double`|<xref:System.Double>|A 64-bit floating point type.|
30+
31+
>[!NOTE]
32+
You can perform computations with integers too big for the 64-bit integer type by using the [bigint](https://msdn.microsoft.com/library/dc8be18d-4042-46c4-b136-2f21a84f6efa) type. `bigint` is not considered a basic type; it is an abbreviation for `System.Numerics.BigInteger`.
33+
34+
## See also
35+
[F# Language Reference](index.md)

docs/fsharp/language-reference/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The following table shows reference topics available that describe types support
5757
|Title|Description|
5858
|-----|-----------|
5959
|[values](values/index.md)|Describes values, which are immutable quantities that have a specific type; values can be integral or floating point numbers, characters or text, lists, sequences, arrays, tuples, discriminated unions, records, class types, or function values.|
60-
|[Primitive Types](primitive-types.md)|Describes the fundamental primitive types that are used in the F# language. It also provides the corresponding .NET types and the minimum and maximum values for each type.|
60+
|[Basic Types](basic-types.md)|Describes the fundamental basic types that are used in the F# language. It also provides the corresponding .NET types and the minimum and maximum values for each type.|
6161
|[Unit Type](unit-type.md)|Describes the `unit` type, which is a type that indicates the absence of a specific value; the `unit` type has only a single value, which acts as a placeholder when no other value exists or is needed.|
6262
|[Strings](strings.md)|Describes strings in F#. The `string` type represents immutable text, as a sequence of Unicode characters. `string` is an alias for `System.String` in the .NET Framework.|
6363
|[Tuples](tuples.md)|Describes tuples, which are groupings of unnamed but ordered values of possibly different types.|

docs/fsharp/language-reference/primitive-types.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

docs/toc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354
### [Literals](fsharp/language-reference/literals.md)
355355
### [F# Types](fsharp/language-reference/fsharp-types.md)
356356
### [Type Inference](fsharp/language-reference/type-inference.md)
357-
### [Primitive Types](fsharp/language-reference/primitive-types.md)
357+
### [Basic Types](fsharp/language-reference/basic-types.md)
358358
### [Unit Type](fsharp/language-reference/unit-type.md)
359359
### [Strings](fsharp/language-reference/strings.md)
360360
### [Tuples](fsharp/language-reference/tuples.md)

0 commit comments

Comments
 (0)