You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update open-wopen.md
Clarify that _O_TEMPORARY sets FILE_SHARE_DELETE.
* Update other pages that mention _O_TEMPORARY effects.
* New article - IDL method wizard
* update after review
* update after review
* Update after review
* Update after review
* Updating - Add property wizard for VS2022
* Updating broken links
* Update after review
* New article - Add an IDL Property
* link updation
* Update after review
* update after review
* update after review
* New article - IDL MFC property wizard
* Broken link fixed
* Broken link fixed
* Update virtual-functions.md
* update for links
* Updating links
* Address cpp-docs 3780 3782 3790 3791 3805
* Attempt correction of table format
* Add documentation for compiler error C2956 and update error text (MicrosoftDocs#4176)
* Add documentation for compiler error C2956 and update error text
* Add TOC entry
* Update for grammar and my own comprehension.
Sometimes, you just get carried away. This version could use some simplification.
* Simplify.
Address remarks, attempt simplification.
Acrolinx all the things.
* More updates per review
Co-authored-by: Colin Robertson <corob@microsoft.com>
* Address cpp-docs 3816
* Address non-blocking issues from 4207
* fix for sample program.
* edits
* edit pass. Move to ide location
* minor edit
* fix link
* Final update
* final update
* final update
* resolving blocking issue
* resolving blocking issue
* ToC update for new article
* ToC update
* link update
* Correct inconsistent formatting for the `_O_EXCL` constant in the docs for the open functions
* Update c28195.md
* Update in alt-text
* Update in alt-text
* Final Update- See also section
* edit pass
* edit pass
* more cleanup
* typo
* small edit
* Final update
* edit pass
* edit pass
* formatting for scannability
* acrolinx
* one more try at spacing
* final update
* VMCS -> VMXON
According to the intel IA32 development manual (Volume 3 C3 23.7):
"Before executing VMXON, software should allocate a naturally aligned 4-KByte region of memory that a logical
processor may use to support VMX operation. This region is called the VMXON region."
* edit and add links
* fix links
* add code example
* click->tick
* Update date, link to Intel docs
* Another go at updating the description
* Fix stray double-quote
* Address issue in DD PR 1393452
* add /interface and /internal-partition - draft (MicrosoftDocs#4227)
* add /interface and /internal-partition - draft
* add example
* fix formatting
* update text regarding example
* tech review
* link updates
* fix switch name and link
* edits
* reorder version info
* cleanup
* add /tp flag
* fix command line
Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com>
* Update os-ot-favor-small-code-favor-fast-code.md
Change "minimize or maximize size" to "minimize size or maximize speed"
* Expand into a whole SEO-friendly sentence
* Clarify when _matherr will be invoked (#4230)
Customer here https://developercommunity.visualstudio.com/t/_matherr-example-does-not-work-for-me/1676341#T-ND10016474 expressed confusion over when _matherr is called. This change points out that the only setting that will enable/disable this is the presence of _matherr, but it will not be triggered when using intrinsics.
* acrolinx and other fixes
* fix typo
* more code escape
* another code escape
* better formatting for retval possibilities
* fix backslashes
* incorp feedback
Co-authored-by: Steve Wishnousky <stwish@microsoft.com>
Co-authored-by: rachana-satao <83084319+rachana-satao@users.noreply.github.com>
Co-authored-by: opbld15 <opbld15@microsoft.com>
Co-authored-by: Colin Robertson <corob@microsoft.com>
Co-authored-by: opbld16 <opbld16@microsoft.com>
Co-authored-by: opbld17 <opbld17@microsoft.com>
Co-authored-by: atikmapari <31974726+atikmapari@users.noreply.github.com>
Co-authored-by: PRMerger19 <prmrgr19@microsoft.com>
Co-authored-by: Ming Ho <94572161+homing1@users.noreply.github.com>
Co-authored-by: PRMerger5 <prmergr5@microsoft.com>
Co-authored-by: Regan Downer <97987445+v-regandowner@users.noreply.github.com>
Co-authored-by: Jonathan Emmett <joemmett@microsoft.com>
Co-authored-by: Tamara K <93546702+tamarakhader@users.noreply.github.com>
Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com>
Co-authored-by: PRMerger17 <prmrgr17@microsoft.com>
Co-authored-by: Paula Miller <v-paulmi@microsoft.com>
Co-authored-by: Martin Storsjö <martin@martin.st>
Co-authored-by: Sunny Chatterjee <sunnych@microsoft.com>
Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com>
Co-authored-by: Colin Cooper <72402153+v-ccolin@users.noreply.github.com>
Co-authored-by: krispy <monstertyo@gmail.com>
Co-authored-by: PRMerger8 <prmrgr8@microsoft.com>
Co-authored-by: PRMerger10 <prmrgr10@microsoft.com>
Co-authored-by: Tech Stuff <103606018+teknixstuff@users.noreply.github.com>
Co-authored-by: Dennis Rea <v-denrea@microsoft.com>
helpviewer_keywords: ["/internalPartition", "Translate include directives into import directives"]
9
9
---
10
10
# `/internalPartition`
11
11
12
-
Use this switch to treat the input file on the command line as an [internal partition unit](http://eel.is/c%2B%2Bdraft/module#unit-4.3).
12
+
Use the **`/internalPartition`** compiler option to treat the input file as an *internal partition unit*, which is a [module partition implementation unit](../../cpp/modules-cpp.md#implementing-modules) that doesn't contribute to the external interface of the module.
13
13
14
14
## Syntax
15
15
16
16
> **`/internalPartition`***`filename`*
17
17
18
18
## Remarks
19
19
20
-
The following example demonstrates using the `/internalPartition` switch:
21
-
22
-
`m-internals.cpp`:
20
+
The following example demonstrates how to use the `/internalPartition` option:
23
21
24
22
```cpp
23
+
// m-internals.cpp
25
24
module m:internals;
26
25
27
26
voidinternalFunc() {} // cannot have `export` since this is an internal partition
28
27
```
29
28
30
-
`m.ixx`:
31
-
32
29
```cpp
30
+
// m.ixx
33
31
exportmodule m;
34
32
import :internals; // Cannot export this partition.
Pointer to the structure containing error information.
27
26
28
27
## Return Value
29
28
30
-
**_matherr** returns 0 to indicate an error, or a nonzero value to indicate success. If **_matherr** returns 0, an error message can be displayed and **errno** is set to an appropriate error value. If **_matherr** returns a nonzero value, no error message is displayed and **errno** remains unchanged.
29
+
**`_matherr`** returns 0 to indicate an error, or a nonzero value to indicate success:
30
+
- If **`_matherr`** returns 0, an error message can be displayed and **`errno`** is set to an appropriate error value.
31
+
- If **`_matherr`** returns a nonzero value, no error message is displayed and **`errno`** remains unchanged.
31
32
32
-
For more information about return codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
33
+
For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
33
34
34
35
## Remarks
35
36
36
-
The **_matherr** function processes errors generated by the floating-point functions of the math library. These functions call **_matherr** when an error is detected.
37
+
The **`_matherr`** function processes errors generated by the floating-point functions of the math library. These functions call **`_matherr`** when an error is detected. This interaction isn't impacted by the [floating-point mode of the compiler](../../build/reference/fp-specify-floating-point-behavior.md) or the [floating point control word](../../c-runtime-library/reference/control87-controlfp-control87-2.md). Since **`_matherr`** is a library function, math [intrinsic functions](../../intrinsics/compiler-intrinsics.md) won't call it.
37
38
38
-
For special error handling, you can provide a different definition of **_matherr**. If you use the dynamically linked version of the C run-time library (CRT), you can replace the default **_matherr** routine in a client executable with a user-defined version. However, you cannot replace the default **_matherr** routine in a DLL client of the CRT DLL.
39
+
For special error handling, you can provide a different definition of **`_matherr`**. If you use the dynamically linked version of the C run-time library (CRT), you can replace the default **`_matherr`** routine in a client executable with a user-defined version. However, you can't replace the default **`_matherr`** routine in a DLL client of the CRT DLL.
39
40
40
-
When an error occurs in a math routine, **_matherr** is called with a pointer to an **_exception** type structure (defined in \<math.h>) as an argument. The **_exception** structure contains the following elements.
41
+
When an error occurs in a math routine, **`_matherr`** is called with a pointer to an **`_exception`** type structure (defined in `<math.h>`) as an argument. The **`_exception`** structure contains the following elements.
41
42
42
43
```C
43
44
struct _exception
@@ -50,36 +51,36 @@ struct _exception
50
51
};
51
52
```
52
53
53
-
The **type** member specifies the type of math error. It is one of the following values, defined in \<math.h>:
54
+
The **`type`** member specifies the type of math error. It's one of the following values, defined in `<math.h>`:
54
55
55
56
|Macro|Meaning|
56
57
|-|-|
57
-
|**_DOMAIN**| Argument domain error |
58
-
|**_SING**| Argument singularity |
59
-
|**_OVERFLOW**| Overflow range error |
60
-
|**_PLOSS**| Partial loss of significance |
61
-
|**_TLOSS**| Total loss of significance |
62
-
|**_UNDERFLOW**| The result is too small to be represented. (This condition is not currently supported.) |
58
+
|**`_DOMAIN`**| Argument domain error |
59
+
|**`_SING`**| Argument singularity |
60
+
|**`_OVERFLOW`**| Overflow range error |
61
+
|**`_PLOSS`**| Partial loss of significance |
62
+
|**`_TLOSS`**| Total loss of significance |
63
+
|**`_UNDERFLOW`**| The result is too small to be represented. (This condition isn't currently supported.) |
63
64
64
-
The structure member **name** is a pointer to a null-terminated string containing the name of the function that caused the error. The structure members **arg1** and **arg2** specify the values that caused the error. If only one argument is given, it is stored in **arg1**.
65
+
The structure member **`name`** is a pointer to a null-terminated string containing the name of the function that caused the error. The structure members **`arg1`** and **`arg2`** specify the values that caused the error. If only one argument is given, it's stored in **`arg1`**.
65
66
66
-
The default return value for the given error is **retval**. If you change the return value, it must specify whether an error actually occurred.
67
+
The default return value for the given error is **`retval`**. If you change the return value, it must specify whether an error actually occurred.
67
68
68
69
## Requirements
69
70
70
71
|Routine|Required header|
71
72
|-------------|---------------------|
72
-
|**_matherr**|\<math.h>|
73
+
|**`_matherr`**|`<math.h>`|
73
74
74
75
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
75
76
76
77
## Example
77
78
78
79
```C
79
-
// crt_matherr.c
80
-
/* illustrates writing an error routine for math
81
-
* functions. The error function must be:
82
-
* _matherr
80
+
/* crt_matherr.c
81
+
* Illustrates writing an error routine for math
82
+
* functions.
83
+
* The error handling function must be named _matherr
83
84
*/
84
85
85
86
#include<math.h>
@@ -102,27 +103,27 @@ int main()
102
103
* returns the natural or base-10 logarithm of the absolute value
103
104
* of the argument and suppresses the usual error message.
104
105
*/
105
-
int_matherr(struct _exception *except)
106
+
int_matherr(struct _exception *except)
106
107
{
107
108
/* Handle _DOMAIN errors for log or log10. */
108
-
if( except->type == _DOMAIN)
109
+
if (except->type == _DOMAIN)
109
110
{
110
-
if( strcmp(except->name, "log") == 0)
111
+
if (strcmp(except->name, "log") == 0)
111
112
{
112
-
except->retval = log(-(except->arg1));
113
-
printf("Special: using absolute value: %s: _DOMAIN "
114
-
"error\n", except->name);
113
+
except->retval = log(-(except->arg1));
114
+
printf("Special: using absolute value: %s: _DOMAIN "
115
+
"error\n", except->name);
115
116
return 1;
116
117
}
117
-
else if( strcmp(except->name, "log10") == 0)
118
+
else if (strcmp(except->name, "log10") == 0)
118
119
{
119
-
except->retval = log10(-(except->arg1));
120
-
printf("Special: using absolute value: %s: _DOMAIN "
121
-
"error\n", except->name);
120
+
except->retval = log10(-(except->arg1));
121
+
printf("Special: using absolute value: %s: _DOMAIN "
0 commit comments