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
Copy file name to clipboardExpand all lines: docs/c-runtime-library/cicos.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ void __cdecl _CIcos();
28
28
29
29
## Remarks
30
30
31
-
This version of the [cos]() function has a specialized calling convention that the compiler understands. It speeds up the execution because it prevents copies from being generated and helps with register allocation.
31
+
This version of the [cos](../c-runtime-library/reference/cos-cosf-cosl.md) function has a specialized calling convention that the compiler understands. It speeds up the execution because it prevents copies from being generated and helps with register allocation.
32
32
33
33
The resulting value is pushed onto the top of the floating-point stack.
34
34
@@ -38,5 +38,5 @@ The resulting value is pushed onto the top of the floating-point stack.
38
38
39
39
## See also
40
40
41
-
[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
Copy file name to clipboardExpand all lines: docs/c-runtime-library/file-handling.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,11 @@ ms.workload: ["cplusplus"]
21
21
22
22
Use these routines to create, delete, and manipulate files and to set and check file-access permissions.
23
23
24
-
The C run-time libraries have a 512 limit for the number of files that can be open at any one time. Attempting to open more than the maximum number of file descriptors or file streams causes program failure. Use [_setmaxstdio](../c-runtime-library/reference/setmaxstdio.md) to change this number.
24
+
The C run-time libraries have a 512 limit for the number of files that can be open at any one time. Attempting to open more than the maximum number of file descriptors or file streams causes program failure. Use [_setmaxstdio](../c-runtime-library/reference/setmaxstdio.md) to change this number.
25
25
26
26
## File-Handling Routines (File Descriptor)
27
27
28
-
These routines operate on files designated by a file descriptor.
28
+
These routines operate on files designated by a file descriptor.
29
29
30
30
|Routine|Use|
31
31
|-------------|---------|
@@ -40,7 +40,7 @@ Use these routines to create, delete, and manipulate files and to set and check
40
40
41
41
## File-Handling Routines (Path or Filename)
42
42
43
-
These routines operate on files specified by a path or filename.
43
+
These routines operate on files specified by a path or filename.
44
44
45
45
|Routine|Use|
46
46
|-------------|---------|
@@ -58,7 +58,7 @@ Use these routines to create, delete, and manipulate files and to set and check
58
58
59
59
## File-Handling Routines (Open File)
60
60
61
-
These routines open files.
61
+
These routines open files.
62
62
63
63
|Routine|Use|
64
64
|-------------|---------|
@@ -69,7 +69,7 @@ Use these routines to create, delete, and manipulate files and to set and check
69
69
|[_pipe](../c-runtime-library/reference/pipe.md)|Creates a pipe for reading and writing.|
70
70
|[freopen, _wfreopen](../c-runtime-library/reference/freopen-wfreopen.md), [freopen_s, _wfreopen_s](../c-runtime-library/reference/freopen-s-wfreopen-s.md)|Reassign a file pointer.|
71
71
72
-
These routines provide a way to change the representation of the file between a `FILE` structure, a file descriptor, and a Win32 file handle.
72
+
These routines provide a way to change the representation of the file between a `FILE` structure, a file descriptor, and a Win32 file handle.
73
73
74
74
|Routine|Use|
75
75
|-------------|---------|
@@ -80,14 +80,14 @@ Use these routines to create, delete, and manipulate files and to set and check
80
80
81
81
The following Win32 functions also open files and pipes:
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/abs-labs-llabs-abs64.md
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,11 +54,7 @@ The **abs**, **labs**, **llabs** and **_abs64** functions return the absolute va
54
54
55
55
Because C++ allows overloading, you can call overloads of **abs** that take and return **long**, **long****long**, **float**, **double**, and **long****double** values. These overloads are defined in the \<cmath> header. In a C program, **abs** always takes and returns an int.
56
56
57
-
**Microsoft Specific**
58
-
59
-
Because the range of negative integers that can be represented by using any integral type is larger than the range of positive integers that can be represented by using that type, it's possible to supply an argument to these functions that can’t be converted. If the absolute value of the argument cannot be represented by the return type, the **abs** functions return the argument value unchanged. Specifically, `abs(INT_MIN)` returns **INT_MIN**, `labs(LONG_MIN)` returns **LONG_MIN**, `llabs(LLONG_MIN)` returns **LLONG_MIN**, and `_abs64(_I64_MIN)` returns **_I64_MIN**. This means that the **abs** functions cannot be used to guarantee a positive value.
60
-
61
-
**End Microsoft Specific**
57
+
**Microsoft Specific**: Because the range of negative integers that can be represented by using any integral type is larger than the range of positive integers that can be represented by using that type, it's possible to supply an argument to these functions that can’t be converted. If the absolute value of the argument cannot be represented by the return type, the **abs** functions return the argument value unchanged. Specifically, `abs(INT_MIN)` returns **INT_MIN**, `labs(LONG_MIN)` returns **LONG_MIN**, `llabs(LLONG_MIN)` returns **LLONG_MIN**, and `_abs64(_I64_MIN)` returns **_I64_MIN**. This means that the **abs** functions cannot be used to guarantee a positive value.
62
58
63
59
## Requirements
64
60
@@ -67,7 +63,7 @@ Because the range of negative integers that can be represented by using any inte
67
63
|**abs**, **labs**, **llabs**|\<math.h> or \<stdlib.h>|\<cmath>, \<cstdlib>, \<stdlib.h> or \<math.h>|
68
64
|**_abs64**|\<stdlib.h>|\<cstdlib> or \<stdlib.h>|
69
65
70
-
To use the overloaded versions of **abs** in C++, you must include the \<cmath> header.
66
+
To use the overloaded versions of **abs** in C++, you must include the \<cmath> header.
71
67
72
68
## Example
73
69
@@ -124,7 +120,6 @@ Microsoft implementation-specific results:
124
120
labs(LONG_MIN) returns -2147483648
125
121
llabs(LLONG_MIN) returns -9223372036854775808
126
122
_abs64(_I64_MIN) returns 0x8000000000000000
127
-
128
123
```
129
124
130
125
## See Also
@@ -134,4 +129,3 @@ Microsoft implementation-specific results:
The double, long double, or float value that's produced by converting the string to a floating-point value. These values are wrapped in a structure.
41
+
The double, long double, or float value that's produced by converting the string to a floating-point value. These values are wrapped in a structure.
63
42
64
-
*str*<br/>
65
-
The string to be parsed to convert into a floating-point value.
43
+
*str*<br/>
44
+
The string to be parsed to convert into a floating-point value.
66
45
67
-
*locale*<br/>
68
-
The locale to use.
46
+
*locale*<br/>
47
+
The locale to use.
69
48
70
49
## Return Value
71
50
72
-
Returns 0 if successful. Possible error codes are **_UNDERFLOW** or **_OVERFLOW**, which are defined in the header file Math.h.
51
+
Returns 0 if successful. Possible error codes are **_UNDERFLOW** or **_OVERFLOW**, which are defined in the header file \<math.h>.
73
52
74
53
## Remarks
75
54
76
55
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.
77
56
78
-
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.
57
+
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.
79
58
80
-
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.
59
+
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.
Copy file name to clipboardExpand all lines: docs/cpp/standard-conversions.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,8 +109,7 @@ int main()
109
109
110
110
Objects of unsigned integral types can be converted to corresponding signed types. However, such a conversion can cause misinterpretation of data if the value of the unsigned object is outside the range representable by the signed type, as demonstrated in the following example:
111
111
112
-
```
113
-
112
+
```cpp
114
113
#include<iostream>
115
114
116
115
usingnamespacestd;
@@ -131,11 +130,11 @@ int main()
131
130
132
131
An object of a floating type can also be converted to a less precise type, if it is in a range representable by that type. (See [Floating Limits](../cpp/floating-limits.md) for the ranges of floating types.) If the original value cannot be represented precisely, it can be converted to either the next higher or the next lower representable value. If no such value exists, the result is undefined. Consider the following example:
133
132
134
-
```
133
+
```cpp
135
134
cout << (float)1E300 << endl;
136
135
```
137
136
138
-
The maximum value representable by type **float** is 3.402823466E38 — a much smaller number than 1E300. Therefore, the number is converted to infinity, and the result is 1.#INF.
137
+
The maximum value representable by type **float** is 3.402823466E38 — a much smaller number than 1E300. Therefore, the number is converted to infinity, and the result is "inf".
139
138
140
139
## Conversions between integral and floating point types
141
140
Certain expressions can cause objects of floating type to be converted to integral types, or vice versa. When an object of integral type is converted to a floating type and the original value cannot be represented exactly, the result is either the next higher or the next lower representable value.
0 commit comments