Skip to content

Commit 185e11a

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#162 from BillyONeal/dev/bion/update_constants
Change integer limits and header name to use standard names.
2 parents 5f19e59 + 0d2a95f commit 185e11a

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

docs/cpp/integer-limits.md

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Integer Limits | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "01/29/2018"
55
ms.reviewer: ""
66
ms.suite: ""
77
ms.technology: ["cpp-language"]
@@ -17,37 +17,39 @@ manager: "ghogen"
1717
ms.workload: ["cplusplus"]
1818
---
1919
# 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

Comments
 (0)