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
Convert a **tm** time structure to a character string. More secure versions of these functions are available; see [asctime_s, _wasctime_s](asctime-s-wasctime-s.md).
15
+
Convert a `tm` time structure to a character string. More secure versions of these functions are available; see [asctime_s, _wasctime_s](asctime-s-wasctime-s.md).
16
16
17
17
## Syntax
18
18
@@ -27,23 +27,23 @@ wchar_t *_wasctime(
27
27
28
28
### Parameters
29
29
30
-
*timeptr*<br/>
30
+
*`timeptr`*<br/>
31
31
Time/date structure.
32
32
33
33
## Return Value
34
34
35
-
**asctime** returns a pointer to the character string result; **_wasctime** returns a pointer to the wide-character string result. There is no error return value.
35
+
**asctime** returns a pointer to the character string result; **_wasctime** returns a pointer to the wide-character string result. There's no error return value.
36
36
37
37
## Remarks
38
38
39
39
More secure versions of these functions are available; see [asctime_s, _wasctime_s](asctime-s-wasctime-s.md).
40
40
41
-
The **asctime** function converts a time stored as a structure to a character string. The *timeptr* value is usually obtained from a call to **gmtime** or **localtime**, which both return a pointer to a **tm** structure, defined in TIME.H.
41
+
The **asctime** function converts a time stored as a structure to a character string. The *`timeptr`* value is typically obtained from a call to **gmtime** or **localtime**, which both return a pointer to a `tm` structure, defined in TIME.H.
42
42
43
-
|timeptr member|Value|
43
+
|`timeptr` member|Value|
44
44
|--------------------|-----------|
45
45
|**tm_hour**|Hours since midnight (0-23)|
46
-
|**tm_isdst**|Positive if daylight saving time is in effect; 0 if daylight saving time is not in effect; negative if status of daylight saving time is unknown. The C run-time library assumes the United States' rules for implementing the calculation of Daylight Saving Time (DST).|
46
+
|**tm_isdst**|Positive if daylight saving time is in effect; 0 if daylight saving time isn't in effect; negative if status of daylight saving time is unknown. The C run-time library assumes the United States' rules for implementing the calculation of Daylight Saving Time (DST).|
47
47
|**tm_mday**|Day of month (1-31)|
48
48
|**tm_min**|Minutes after hour (0-59)|
49
49
|**tm_mon**|Month (0-11; January = 0)|
@@ -52,15 +52,15 @@ The **asctime** function converts a time stored as a structure to a character st
52
52
|**tm_yday**|Day of year (0-365; January 1 = 0)|
53
53
|**tm_year**|Year (current year minus 1900)|
54
54
55
-
The converted character string is also adjusted according to the local time zone settings. For information about configuring the local time, see the [time](time-time32-time64.md), [_ftime](ftime-ftime32-ftime64.md), and [localtime](localtime-localtime32-localtime64.md) functions and the [_tzset](tzset.md) function for information about defining the time zone environment and global variables.
55
+
The converted character string is also adjusted according to the local time zone settings. For information about configuring the local time, see the [time](time-time32-time64.md), [_ftime](ftime-ftime32-ftime64.md), and [localtime](localtime-localtime32-localtime64.md) functions. For information about defining the time zone environment and global variables, see the [_tzset](tzset.md) function.
56
56
57
57
The string result produced by **asctime** contains exactly 26 characters and has the form `Wed Jan 2 02:03:55 1980\n\0`. A 24-hour clock is used. All fields have a constant width. The newline character and the null character occupy the last two positions of the string. **asctime** uses a single, statically allocated buffer to hold the return string. Each call to this function destroys the result of the previous call.
58
58
59
59
**_wasctime** is a wide-character version of **asctime**. **_wasctime** and **asctime** behave identically otherwise.
60
60
61
61
These functions validate their parameters. If *timeptr* is a null pointer, or if it contains out-of-range values, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **NULL** and sets **errno** to **EINVAL**.
62
62
63
-
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
63
+
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
64
64
65
65
### Generic-Text Routine Mapping
66
66
@@ -77,7 +77,7 @@ By default, this function's global state is scoped to the application. To change
77
77
78
78
## Example
79
79
80
-
This program places the system time in the long integer **aclock**, translates it into the structure **newtime** and then converts it to string form for output, using the **asctime** function.
80
+
This program places the system time in the long integer `aclock`, translates it into the structure `newtime` and then converts it to string form for output, using the **asctime** function.
@@ -48,7 +48,7 @@ Because C++ allows overloading, you can call overloads of **`asin`** with **`flo
48
48
49
49
If you use the `<tgmath.h>` `asin()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
50
50
51
-
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
51
+
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/asinh-asinhf-asinhl.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ Floating-point value.
33
33
34
34
## Return Value
35
35
36
-
The **asinh** functions return the inverse hyberbolic sine (arc hyperbolic sine) of *x*. This function is valid over the floating-point domain. If *x* is a quiet NaN, indefinite, or infinity, the same value is returned.
36
+
The **asinh** functions return the inverse hyperbolic sine (arc hyperbolic sine) of *x*. This function is valid over the floating-point domain. If *x* is a quiet NaN, indefinite, or infinity, the same value is returned.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ A wide string to display as part of the report.
31
31
32
32
## Remarks
33
33
34
-
The **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** macros provide an application with a clean and simple mechanism for checking assumptions during the debugging process. They're very flexible because they don't need to be enclosed in `#ifdef` statements to prevent them from being called in a retail build of an application. This flexibility is achieved by using the [`_DEBUG`](../../c-runtime-library/debug.md) macro. **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** are only available when **`_DEBUG`** is defined at compile time. When **`_DEBUG`** isn't defined, calls to these macros are removed during preprocessing.
34
+
The **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** macros provide an application with a clean and simple mechanism for checking assumptions during the debugging process. They're flexible because they don't need to be enclosed in `#ifdef` statements to prevent them from being called in a retail build of an application. This flexibility is achieved by using the [`_DEBUG`](../../c-runtime-library/debug.md) macro. **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** are only available when **`_DEBUG`** is defined at compile time. When **`_DEBUG`** isn't defined, calls to these macros are removed during preprocessing.
35
35
36
36
**`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** evaluate their *`booleanExpression`* argument and when the result is **`false`** (0), they print a diagnostic message and call [`_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md) to generate a debug report. The **`_ASSERT`** macro prints a simple diagnostic message, **`_ASSERTE`** includes a string representation of the failed expression in the message, and **`_ASSERT_EXPR`** includes the *`message`* string in the diagnostic message. These macros do nothing when *`booleanExpression`* evaluates to nonzero.
**`_CrtDbgReportW`** generates the debug report and determines its destination or destinations, based on the current report mode or modes and file defined for the **`_CRT_ASSERT`** report type. By default, assertion failures and errors are directed to a debug message window. The [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions are used to define the destinations for each report type.
49
49
50
-
When the destination is a debug message window and the user selects the **Retry** button, **`_CrtDbgReportW`** returns 1, causing the **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** macros to start the debugger provided that just-in-time (JIT) debugging is enabled.
50
+
When the destination is a debug message window and the user selects the **Retry** button, **`_CrtDbgReportW`** returns 1, causing the **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** macros to start the debugger if just-in-time (JIT) debugging is enabled.
51
51
52
52
For more information about the reporting process, see the [`_CrtDbgReport`, `_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md) function. For more information about resolving assertion failures and using these macros as a debugging error handling mechanism, see [Using Macros for Verification and Reporting](/visualstudio/debugger/macros-for-reporting).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/assert-macro-assert-wassert.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -54,25 +54,25 @@ The `assert` macro prints a diagnostic message when *`expression`* evaluates to
54
54
55
55
The diagnostic message is printed in wide (`wchar_t`) characters. Therefore, it will work as expected even if there are Unicode characters in the expression.
56
56
57
-
The destination of the diagnostic message depends on the type of application that called the routine. Console applications receive the message through **`stderr`**. In a Windows-based application, `assert` calls the Windows [`MessageBox`](/windows/win32/api/winuser/nf-winuser-messagebox) function to create a message box to display the message with three buttons: **Abort**, **Retry**, and **Ignore**. If the user clicks**Abort**, the program aborts immediately. If the user clicks**Retry**, the debugger is called and the user can debug the program if just-in-time (JIT) debugging is enabled. If the user clicks**Ignore**, the program will continue with normal execution. Clicking **Ignore** when an error condition exists can result in undefined behavior since preconditions of the calling code weren't met.
57
+
The destination of the diagnostic message depends on the type of application that called the routine. Console applications receive the message through **`stderr`**. In a Windows-based application, `assert` calls the Windows [`MessageBox`](/windows/win32/api/winuser/nf-winuser-messagebox) function to create a message box to display the message with three buttons: **Abort**, **Retry**, and **Ignore**. If the user chooses**Abort**, the program aborts immediately. If the user chooses**Retry**, the debugger is called, and the user can debug the program if just-in-time (JIT) debugging is enabled. If the user chooses**Ignore**, the program will continue with normal execution. Clicking **Ignore** when an error condition exists can result in undefined behavior since preconditions of the calling code weren't met.
58
58
59
59
To override the default output behavior regardless of the app type, call [`_set_error_mode`](set-error-mode.md) to select between the output-to-stderr and display-dialog-box behavior.
60
60
61
-
After `assert` displays its message, it calls [`abort`](abort.md), which displays a dialog box with **Abort**, **Retry**, and **Ignore** buttons. [`abort`](abort.md) exits the program, so the **Retry** and **Ignore** button won't resume program execution following the `assert` call. If `assert` displayed a dialog box, the [`abort`](abort.md) dialog box isn't shown. The only time the [`abort`](abort.md) dialog box is shown is when `assert` sends its output to stderr.
61
+
After `assert` displays its message, it calls [`abort`](abort.md), which displays a dialog box with **Abort**, **Retry**, and **Ignore** buttons. [`abort`](abort.md) exits the program, so the **Retry** and **Ignore** button won't resume program execution following the `assert` call. If `assert` displayed a dialog box, the [`abort`](abort.md) dialog box isn't shown. The only time the [`abort`](abort.md) dialog box is shown, is when `assert` sends its output to stderr.
62
62
63
63
As a consequence of the above behavior, a dialog box is always displayed following an `assert` call in debug mode. The behavior of each button is captured in the below table.
64
64
65
65
|Error mode|Output to `stderr` (Console/`_OUT_TO_STDERR`)|Display Dialog Box (Windows/`_OUT_TO_MSGBOX`)|
66
66
|----------|----------------|------------------|
67
67
|`Abort`|Exit immediately with exit code 3|Exit immediately with exit code 3|
68
68
|`Retry`|Break into debugger during `abort`|Break into debugger during `assert`|
69
-
|`Ignore`|Finish exiting via `abort`|Continue program as though the assert didn't fire (may result in undefined behavior since preconditions of the calling code weren't met)|
69
+
|`Ignore`|Finish exiting via `abort`|Continue program as though `assert` didn't fire (may result in undefined behavior since preconditions of the calling code weren't met)|
70
70
71
71
For more information about CRT debugging, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques).
72
72
73
73
The `_assert` and `_wassert` functions are internal CRT functions. They help minimize the code required in your object files to support assertions. We don't recommend that you call these functions directly.
74
74
75
-
The `assert` macro is enabled in both the release and debug versions of the C run-time libraries when **`NDEBUG`** isn't defined. When **`NDEBUG`** is defined, the macro is available but doesn't evaluate its argument and has no effect. When it's enabled, the `assert` macro calls `_wassert` for its implementation. Other assertion macros, [`_ASSERT`](assert-asserte-assert-expr-macros.md), [`_ASSERTE`](assert-asserte-assert-expr-macros.md) and [`_ASSERT_EXPR`](assert-asserte-assert-expr-macros.md), are also available, but they only evaluate the expressions passed to them when the [`_DEBUG`](../../c-runtime-library/debug.md) macro has been defined and when they are in code linked with the debug version of the C run-time libraries.
75
+
The `assert` macro is enabled in both the release and debug versions of the C run-time libraries when **`NDEBUG`** isn't defined. When **`NDEBUG`** is defined, the macro is available, but doesn't evaluate its argument and has no effect. When it's enabled, the `assert` macro calls `_wassert` for its implementation. Other assertion macros, [`_ASSERT`](assert-asserte-assert-expr-macros.md), [`_ASSERTE`](assert-asserte-assert-expr-macros.md) and [`_ASSERT_EXPR`](assert-asserte-assert-expr-macros.md), are also available, but they only evaluate the expressions passed to them when the [`_DEBUG`](../../c-runtime-library/debug.md) macro has been defined and when they are in code linked with the debug version of the C run-time libraries.
@@ -58,7 +58,7 @@ If you use the `<tgmath.h>` `atan()` or `atan2()` macro, the type of the argumen
58
58
59
59
Because C++ allows overloading, you can call overloads of **`atan`** and **`atan2`** that take **`float`** or **`long double`** arguments. In a C program, unless you're using the `<tgmath.h>` macro to call this function, **`atan`** and **`atan2`** always take **`double`** arguments and return a **`double`**.
60
60
61
-
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
61
+
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/atanh-atanhf-atanhl.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,11 @@ Floating-point value.
33
33
34
34
## Return Value
35
35
36
-
The **atanh** functions return the inverse hyberbolic tangent (arc hyperbolic tangent) of *x*. If *x* is greater than 1, or less than -1, **errno** is set to **EDOM** and the result is a quiet NaN. If *x* is equal to 1 or -1, a positive or negative infinity is returned, respectively, and **errno** is set to **ERANGE**.
36
+
The **atanh** functions return the inverse hyperbolic tangent (arc hyperbolic tangent) of *x*. If *x* is greater than 1, or less than -1, **errno** is set to **EDOM** and the result is a quiet NaN. If *x* is equal to 1 or -1, a positive or negative infinity is returned, respectively, and **errno** is set to **ERANGE**.
@@ -46,7 +46,7 @@ Because C++ allows overloading, you can call overloads of **atanh** that take an
46
46
47
47
If you use the \<tgmath.h> `atanh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
48
48
49
-
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
49
+
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
50
50
51
51
## Requirements
52
52
@@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change
55
55
|**atanh**, **atanhf**, **atanhl**|\<math.h>|\<cmath> or \<math.h>|
56
56
|**atanh()** macro | \<tgmath.h> ||
57
57
58
-
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
58
+
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -42,13 +42,13 @@ Returns 0 if successful. Possible error codes are **_UNDERFLOW** or **_OVERFLOW*
42
42
43
43
## Remarks
44
44
45
-
These functions convert a string to a floating-point value. The difference between these functions and the **atof** family of functions is that these functions do not generate floating-point code and do not cause hardware exceptions. Instead, error conditions are reported as error codes.
45
+
These functions convert a string to a floating-point value. The difference between these functions and the **atof** family of functions is that these functions don't generate floating-point code and don't cause hardware exceptions. Instead, error conditions are reported as error codes.
46
46
47
-
If a string does not have a valid interpretation as a floating-point value, *value* is set to zero and the return value is zero.
47
+
If a string doesn't have a valid interpretation as a floating-point value, *value* is set to zero, and the return value is zero.
48
48
49
49
The versions of these functions that have the **_l** suffix are identical the versions that don't have the suffix, except that they use the *locale* parameter that's passed in instead of the current thread locale.
50
50
51
-
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
51
+
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
0 commit comments