Skip to content

Commit 82c9d53

Browse files
authored
Merge pull request #5851 from MicrosoftDocs/main
3/26/2025 AM Publish
2 parents c7c83af + 9083c8c commit 82c9d53

File tree

9 files changed

+112
-96
lines changed

9 files changed

+112
-96
lines changed
Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,59 @@
11
---
2-
description: "Learn more about: _ismbc Routines"
32
title: "_ismbc Routines"
3+
description: "Learn more about: _ismbc Routines"
44
ms.date: "11/04/2016"
55
helpviewer_keywords: ["ismbc routines", "_ismbc routines"]
6-
ms.assetid: b8995391-7857-4ac3-9a1e-de946eb4464d
76
---
87
# `_ismbc` routines
98

109
Each `_ismbc` routine tests a given multibyte character `c` for a particular condition.
1110

12-
- [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md)\
13-
- [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)\
14-
- [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md)\
15-
- [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)\
16-
- [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)\
17-
- [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)
11+
- [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](reference/ismbcalnum-functions.md)
12+
- [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)
13+
- [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](reference/ismbcgraph-functions.md)
14+
- [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)
15+
- [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)
16+
- [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)
1817

1918
## Remarks
2019

21-
The test result of each `_ismbc` routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with [`_getmbcp`](./reference/getmbcp.md) or [`_setmbcp`](./reference/setmbcp.md), respectively.
20+
The test result of each `_ismbc` routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with [`_getmbcp`](reference/getmbcp.md) or [`_setmbcp`](reference/setmbcp.md), respectively.
2221

23-
The output value is affected by the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](./reference/setlocale-wsetlocale.md). The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead.
22+
The output value is affected by the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](reference/setlocale-wsetlocale.md). The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead.
2423

2524
| Routine | Test condition | Code page 932 example |
2625
|---|---|---|
27-
| [`_ismbcalnum`, `_ismbcalnum_l`](./reference/ismbcalnum-functions.md) | Alphanumeric | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcdigit` and `_ismbcalpha`. |
28-
| [`_ismbcalpha`, `_ismbcalpha_l`](./reference/ismbcalnum-functions.md) | Alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcupper` and `_ismbclower`; or a katakana letter: 0xA6<=`c`<=0xDF. |
29-
| [`_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md) | Digit | Returns nonzero if and only if `c` is a single-byte representation of an ASCII digit: 0x30<=`c`<=0x39. |
30-
| [`_ismbcgraph`, `_ismbcgraph_l`](./reference/ismbcgraph-functions.md) | Graphic | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. |
31-
| [`_ismbclegal`, `_ismbclegal_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Valid multibyte character | Returns nonzero if and only if the first byte of `c` is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC. |
32-
| [`_ismbclower`, `_ismbclower_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Lowercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII lowercase English letter: 0x61<=`c`<=0x7A. |
33-
| [`_ismbcprint`, `_ismbcprint_l`](./reference/ismbcgraph-functions.md) | Printable | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for `_ismbcspace`, `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. |
34-
| [`_ismbcpunct`, `_ismbcpunct_l`](./reference/ismbcgraph-functions.md) | Punctuation | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana punctuation character. |
35-
| [`_ismbcblank`, `_ismbcblank_l`](./reference/ismbcgraph-functions.md) | Space or horizontal tab | Returns nonzero if and only if `c` is a single-byte representation of a space character or a horizontal tab character: `c`=0x20 or `c`=0x09. |
36-
| [`_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md) | Whitespace | Returns nonzero if and only if `c` is a white space character: `c`=0x20 or 0x09<=`c`<=0x0D. |
37-
| [`_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Multibyte symbol | Returns nonzero if and only if 0x8141<=`c`<=0x81AC. |
38-
| [`_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Uppercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII uppercase English letter: 0x41<=`c`<=0x5A. |
26+
| [`_ismbcalnum`, `_ismbcalnum_l`](reference/ismbcalnum-functions.md) | Alphanumeric | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcdigit` and `_ismbcalpha`. |
27+
| [`_ismbcalpha`, `_ismbcalpha_l`](reference/ismbcalnum-functions.md) | Alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcupper` and `_ismbclower`; or a katakana letter: 0xA6<=`c`<=0xDF. |
28+
| [`_ismbcdigit`, `_ismbcdigit_l`](reference/ismbcalnum-functions.md) | Digit | Returns nonzero if and only if `c` is a single-byte representation of an ASCII digit: 0x30<=`c`<=0x39. |
29+
| [`_ismbcgraph`, `_ismbcgraph_l`](reference/ismbcgraph-functions.md) | Graphic | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. |
30+
| [`_ismbclegal`, `_ismbclegal_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Valid multibyte character | Returns nonzero if and only if the first byte of `c` is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC. |
31+
| [`_ismbclower`, `_ismbclower_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Lowercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII lowercase English letter: 0x61<=`c`<=0x7A. |
32+
| [`_ismbcprint`, `_ismbcprint_l`](reference/ismbcgraph-functions.md) | Printable | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for `_ismbcspace`, `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. |
33+
| [`_ismbcpunct`, `_ismbcpunct_l`](reference/ismbcgraph-functions.md) | Punctuation | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana punctuation character. |
34+
| [`_ismbcblank`, `_ismbcblank_l`](reference/ismbcgraph-functions.md) | Space or horizontal tab | Returns nonzero if and only if `c` is a single-byte representation of a space character or a horizontal tab character: `c`=0x20 or `c`=0x09. |
35+
| [`_ismbcspace`, `_ismbcspace_l`](reference/ismbcgraph-functions.md) | Whitespace | Returns nonzero if and only if `c` is a white space character: `c`=0x20 or 0x09<=`c`<=0x0D. |
36+
| [`_ismbcsymbol`, `_ismbcsymbol_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Multibyte symbol | Returns nonzero if and only if 0x8141<=`c`<=0x81AC. |
37+
| [`_ismbcupper`, `_ismbcupper_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Uppercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII uppercase English letter: 0x41<=`c`<=0x5A. |
3938

4039
**Code Page 932 Specific**
4140

4241
The following routines are specific to code page 932.
4342

4443
| Routine | Test condition (code page 932 only) |
4544
|---|---|
46-
| [`_ismbchira`, `_ismbchira_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte Hiragana: 0x829F<=`c`<=0x82F1. |
47-
| [`_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte katakana: 0x8340<=`c`<=0x8396. |
48-
| [`_ismbcl0`, `_ismbcl0_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS non-Kanji: 0x8140<=`c`<=0x889E. |
49-
| [`_ismbcl1`, `_ismbcl1_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-1: 0x889F<=`c`<=0x9872. |
50-
| [`_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-2: 0x989F<=`c`<=0xEA9E. |
45+
| [`_ismbchira`, `_ismbchira_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte Hiragana: 0x829F<=`c`<=0x82F1. |
46+
| [`_ismbckata`, `_ismbckata_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte katakana: 0x8340<=`c`<=0x8396. |
47+
| [`_ismbcl0`, `_ismbcl0_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS non-Kanji: 0x8140<=`c`<=0x889E. |
48+
| [`_ismbcl1`, `_ismbcl1_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-1: 0x889F<=`c`<=0x9872. |
49+
| [`_ismbcl2`, `_ismbcl2_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-2: 0x989F<=`c`<=0xEA9E. |
5150

52-
`_ismbcl0`, `_ismbcl1`, and `_ismbcl2` check that the specified value `c` matches the test conditions described in the preceding table, but don't check that `c` is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [`_ismbbtrail`, `_ismbbtrail_l`](./reference/ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined.
51+
`_ismbcl0`, `_ismbcl1`, and `_ismbcl2` check that the specified value `c` matches the test conditions described in the preceding table, but don't check that `c` is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [`_ismbbtrail`, `_ismbbtrail_l`](reference/ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined.
5352

5453
**END Code Page 932 Specific**
5554

5655
## See also
5756

58-
[Character classification](./character-classification.md)\
59-
[`is`, `isw` routines](./is-isw-routines.md)\
60-
[`_ismbb` routines](./ismbb-routines.md)
57+
[Character classification](character-classification.md)\
58+
[`is`, `isw` routines](is-isw-routines.md)\
59+
[`_ismbb` routines](ismbb-routines.md)

docs/c-runtime-library/language-strings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ helpviewer_keywords: ["language strings"]
66
---
77
# Language strings
88

9-
The [`setlocale`](./reference/setlocale-wsetlocale.md) and [`_create_locale`](./reference/create-locale-wcreate-locale.md) functions can use the Windows NLS API supported languages on operating systems that don't use the Unicode code page. For a list of supported languages by operating system version, see [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. The language string can be any of the values in the **Language** and **Language tag** columns of the list of supported languages. For example code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample).
9+
The [`setlocale`](reference/setlocale-wsetlocale.md) and [`_create_locale`](reference/create-locale-wcreate-locale.md) functions can use the Windows NLS API supported languages on operating systems that don't use the Unicode code page. For a list of supported languages by operating system version, see [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. The language string can be any of the values in the **Language** and **Language tag** columns of the list of supported languages. For example code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample).
1010

1111
## Supported language strings
1212

@@ -82,7 +82,7 @@ The Microsoft C run-time library implementation also supports these language str
8282

8383
## See also
8484

85-
- [Locale names, Languages, and Country/Region strings](./locale-names-languages-and-country-region-strings.md)\
86-
- [Country/Region strings](./country-region-strings.md)\
87-
- [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\
88-
- [`_create_locale`, `_wcreate_locale`](./reference/create-locale-wcreate-locale.md)
85+
- [Locale names, Languages, and Country/Region strings](locale-names-languages-and-country-region-strings.md)
86+
- [Country/Region strings](country-region-strings.md)
87+
- [`setlocale`, `_wsetlocale`](reference/setlocale-wsetlocale.md)
88+
- [`_create_locale`, `_wcreate_locale`](reference/create-locale-wcreate-locale.md)

docs/code-quality/c28020.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
11
---
2-
description: "Learn more about: Warning C28020"
32
title: Warning C28020
4-
ms.date: 11/04/2016
3+
description: "Learn more about: Warning C28020"
4+
ms.date: 03/25/2025
55
f1_keywords: ["C28020"]
66
helpviewer_keywords: ["C28020"]
7-
ms.assetid: 3612185a-0858-4ba9-b795-4a0681073cf7
87
---
98
# Warning C28020
109

11-
> The expression '*expr*' is not true at this call
10+
> The expression '*expr*' is not true at this call.
1211
1312
This warning is reported when the `_Satisfies_` expression listed isn't true. Frequently, the warning indicates an incorrect parameter.
1413

1514
If this warning occurs on a function declaration, the annotations indicate an impossible condition.
15+
16+
## Example
17+
18+
The following example generates C28020:
19+
20+
```cpp
21+
#include <sal.h>
22+
23+
int func(_In_range_(0, 10) int value)
24+
{
25+
return value;
26+
}
27+
28+
int main()
29+
{
30+
func(11); // C28020
31+
}
32+
```

docs/cpp/casting.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "Learn more about: Casting in C++"
32
title: "Casting"
3+
description: "Learn more about: Casting in C++"
44
ms.date: 6/11/2024
55
helpviewer_keywords: ["casting [C++]", "coercion [C++]", "virtual functions [C++], in derived classes [C++]", "static cast operator", "dynamic cast operator", "polymorphic classes [C++]", "classes [C++], polymorphism"]
66
ai-usage: ai-assisted
@@ -9,21 +9,21 @@ ai-usage: ai-assisted
99

1010
In C++, if a class is derived from a base class containing one or more virtual functions, a pointer to that base class type can be used to call virtual functions in the derived class object. A class containing virtual functions is sometimes called a "polymorphic class."
1111

12-
![Diagram of a class hierarchy where C derives from B, which derives from A.](../cpp/media/vc38zz1.gif "Class hierarchy")<br/>
12+
![Diagram of a class hierarchy where C derives from B, which derives from A.](media/vc38zz1.gif "Class hierarchy")\
1313
Class hierarchy
1414

1515
An object of type `C` can be visualized as follows:
1616

17-
![Diagram of Class C with subobjects B and A.](../cpp/media/vc38zz2.gif "Class C with subobjects B and A") <br/>
17+
![Diagram of Class C with subobjects B and A.](media/vc38zz2.gif "Class C with subobjects B and A")\
1818
Class C with subobjects B and A
1919

2020
Given an instance of class `C`, there's a `B` subobject and an `A` subobject. The instance of `C`, including the `A` and `B` subobjects, is the "complete object."
2121

2222
Because a derived class completely contains the definitions of all the base classes from which it's derived, it's safe to cast a pointer to any of its base classes (also called an upcast). Given a pointer to a base class, it may be safe to cast the pointer to an instance of a derived class (also called a downcast).
2323

24-
Using run-time type information, it's possible to check whether a pointer actually points to a complete object and can be safely cast to point to another object in its hierarchy. The [dynamic_cast](../cpp/dynamic-cast-operator.md) operator performs a run-time check to ensure that the operation is safe. It's better to design your class hierarchy so that you can use virtual functions to avoid the need for downcasting. However, if you must downcast, use `dynamic_cast` to ensure that the operation is safe.
24+
Using run-time type information, it's possible to check whether a pointer actually points to a complete object and can be safely cast to point to another object in its hierarchy. The [dynamic_cast](dynamic-cast-operator.md) operator performs a run-time check to ensure that the operation is safe. It's better to design your class hierarchy so that you can use virtual functions to avoid the need for downcasting. However, if you must downcast, use `dynamic_cast` to ensure that the operation is safe.
2525

26-
For conversion of nonpolymorphic types, you can use the [static_cast](../cpp/static-cast-operator.md) operator (this topic explains the difference between static and dynamic casting conversions, and when it's appropriate to use each).
26+
For conversion of nonpolymorphic types, you can use the [static_cast](static-cast-operator.md) operator (this topic explains the difference between static and dynamic casting conversions, and when it's appropriate to use each).
2727

2828
The following example demonstrates the use of `dynamic_cast` and `static_cast`:
2929

@@ -72,9 +72,9 @@ int main() {
7272
7373
This section covers the following topics:
7474
75-
- [Casting operators](../cpp/casting-operators.md)\
76-
- [Run-time type information](../cpp/run-time-type-information.md)
75+
- [Casting operators](casting-operators.md)
76+
- [Run-time type information](run-time-type-information.md)
7777
7878
## See also
7979
80-
[Expressions](../cpp/expressions-cpp.md)
80+
[Expressions](expressions-cpp.md)

0 commit comments

Comments
 (0)