1
1
---
2
2
title : " Integer Limits | Microsoft Docs"
3
3
ms.custom : " "
4
- ms.date : " 11/04/2016 "
4
+ ms.date : " 01/29/2018 "
5
5
ms.reviewer : " "
6
6
ms.suite : " "
7
7
ms.technology : ["cpp-language"]
@@ -17,37 +17,39 @@ manager: "ghogen"
17
17
ms.workload : ["cplusplus"]
18
18
---
19
19
# Integer Limits
20
- ** Microsoft Specific**
21
-
22
- The limits for integer types are listed in the following table. These limits are also defined in the standard header file \< limits.h>.
23
-
24
- ### Limits on Integer Constants
25
-
26
- | Constant| Meaning| Value|
27
- | --------------| -------------| -----------|
28
- | ** CHAR_BIT** | Number of bits in the smallest variable that is not a bit field.| 8|
29
- | ** SCHAR_MIN** | Minimum value for a variable of type ** signed char** .| -128|
30
- | ** SCHAR_MAX** | Maximum value for a variable of type ** signed char** .| 127|
31
- | ** UCHAR_MAX** | Maximum value for a variable of type ` unsigned char ` .| 255 (0xff)|
32
- | ** CHAR_MIN** | Minimum value for a variable of type ` char ` .| -128; 0 if /J option used|
33
- | ** CHAR_MAX** | Maximum value for a variable of type ` char ` .| 127; 255 if /J option used|
34
- | ** MB_LEN_MAX** | Maximum number of bytes in a multicharacter constant.| 5|
35
- | ** SHRT_MIN** | Minimum value for a variable of type ** short** .| -32768|
36
- | ** SHRT_MAX** | Maximum value for a variable of type ** short** .| 32767|
37
- | ** USHRT_MAX** | Maximum value for a variable of type ** unsigned short** .| 65535 (0xffff)|
38
- | ** INT_MIN** | Minimum value for a variable of type ` int ` .| -2147483648|
39
- | ** INT_MAX** | Maximum value for a variable of type ` int ` .| 2147483647|
40
- | ** UINT_MAX** | Maximum value for a variable of type ` unsigned int ` .| 4294967295 (0xffffffff)|
41
- | ** LONG_MIN** | Minimum value for a variable of type ** long** .| -2147483648|
42
- | ** LONG_MAX** | Maximum value for a variable of type ** long** .| 2147483647|
43
- | ** ULONG_MAX** | Maximum value for a variable of type ` unsigned long ` .| 4294967295 (0xffffffff)|
44
- | ** _ I64_MIN** | Minimum value for a variable of type ` __int64 ` | -9223372036854775808|
45
- | ** _ I64_MAX** | Maximum value for a variable of type ` __int64 ` | 9223372036854775807|
46
- | ** _ UI64_MAX** | Maximum value for a variable of type ** unsigned __ int64** | 18446744073709551615 (0xffffffffffffffff)|
47
-
48
- If a value exceeds the largest integer representation, the Microsoft compiler generates an error.
49
-
50
- ** END Microsoft Specific**
51
-
52
- ## See Also
53
- [ Floating Limits] ( ../cpp/floating-limits.md )
20
+
21
+ ** Microsoft Specific**
22
+
23
+ The limits for integer types are listed in the following table. These limits are also defined in the standard header file <limits.h>.
24
+
25
+ ## Limits on Integer Constants
26
+
27
+ | Constant| Meaning| Value|
28
+ | --------------| -------------| -----------|
29
+ | ** CHAR_BIT** | Number of bits in the smallest variable that is not a bit field.| 8|
30
+ | ** SCHAR_MIN** | Minimum value for a variable of type ** signed char** .| -128|
31
+ | ** SCHAR_MAX** | Maximum value for a variable of type ** signed char** .| 127|
32
+ | ** UCHAR_MAX** | Maximum value for a variable of type ** unsigned char** .| 255 (0xff)|
33
+ | ** CHAR_MIN** | Minimum value for a variable of type ** char** .| -128; 0 if /J option used|
34
+ | ** CHAR_MAX** | Maximum value for a variable of type ** char** .| 127; 255 if /J option used|
35
+ | ** MB_LEN_MAX** | Maximum number of bytes in a multicharacter constant.| 5|
36
+ | ** SHRT_MIN** | Minimum value for a variable of type ** short** .| -32768|
37
+ | ** SHRT_MAX** | Maximum value for a variable of type ** short** .| 32767|
38
+ | ** USHRT_MAX** | Maximum value for a variable of type ** unsigned short** .| 65535 (0xffff)|
39
+ | ** INT_MIN** | Minimum value for a variable of type ** int** .| -2147483648|
40
+ | ** INT_MAX** | Maximum value for a variable of type ** int** .| 2147483647|
41
+ | ** UINT_MAX** | Maximum value for a variable of type ** unsigned int** .| 4294967295 (0xffffffff)|
42
+ | ** LONG_MIN** | Minimum value for a variable of type ** long** .| -2147483648|
43
+ | ** LONG_MAX** | Maximum value for a variable of type ** long** .| 2147483647|
44
+ | ** ULONG_MAX** | Maximum value for a variable of type ** unsigned long** .| 4294967295 (0xffffffff)|
45
+ | ** LLONG_MIN** | Minimum value for a variable of type ** long long** | -9223372036854775808|
46
+ | ** LLONG_MAX** | Maximum value for a variable of type ** long long** | 9223372036854775807|
47
+ | ** ULLONG_MAX** | Maximum value for a variable of type ** unsigned long long** | 18446744073709551615 (0xffffffffffffffff)|
48
+
49
+ If a value exceeds the largest integer representation, the Microsoft compiler generates an error.
50
+
51
+ ** END Microsoft Specific**
52
+
53
+ ## See Also
54
+
55
+ [ Floating Limits] ( ../cpp/floating-limits.md )
0 commit comments