Skip to content

Commit e30c610

Browse files
authored
Replace term "sample" with "example" for error references in range [C1001, C1020]
1 parent 7ce83a1 commit e30c610

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

docs/error-messages/compiler-errors-1/fatal-error-c1004.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To resolve this error, check for the following:
3232

3333
## Example
3434

35-
The following sample generates C1004:
35+
The following example generates C1004:
3636

3737
```cpp
3838
// C1004.cpp

docs/error-messages/compiler-errors-1/fatal-error-c1012.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The parentheses in a preprocessor directive do not match.
1515

1616
## Example
1717

18-
The following sample generates C1012:
18+
The following example generates C1012:
1919

2020
```cpp
2121
// C1012.cpp

docs/error-messages/compiler-errors-1/fatal-error-c1016.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The conditional compilation directive ([#ifdef](../../preprocessor/hash-ifdef-an
1616

1717
## Example
1818

19-
The following sample generates C1016:
19+
The following example generates C1016:
2020

2121
```cpp
2222
// C1016.cpp

docs/error-messages/compiler-errors-1/fatal-error-c1017.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Constants defined using `#define` must have values that evaluate to an integer c
1818

1919
## Example
2020

21-
The following sample generates C1017:
21+
The following example generates C1017:
2222

2323
```cpp
2424
// C1017.cpp
@@ -39,7 +39,7 @@ Possible resolution:
3939

4040
Because `CONSTANT_NAME` evaluates to a string and not an integer, the `#if` directive generates fatal error C1017.
4141

42-
In other cases, the preprocessor evaluates an undefined constant as zero. This can cause unintended results, as shown in the following sample. `YES` is undefined, so it evaluates to zero. The expression `#if` `CONSTANT_NAME` evaluates to false and the code to be used on `YES` is removed by the preprocessor. `NO` is also undefined (zero), so `#elif` `CONSTANT_NAME==NO` evaluates to true (`0 == 0`), causing the preprocessor to leave the code in the `#elif` portion of the statement — exactly the opposite of the intended behavior.
42+
In other cases, the preprocessor evaluates an undefined constant as zero. This can cause unintended results, as shown in the following example. `YES` is undefined, so it evaluates to zero. The expression `#if` `CONSTANT_NAME` evaluates to false and the code to be used on `YES` is removed by the preprocessor. `NO` is also undefined (zero), so `#elif` `CONSTANT_NAME==NO` evaluates to true (`0 == 0`), causing the preprocessor to leave the code in the `#elif` portion of the statement — exactly the opposite of the intended behavior.
4343

4444
```cpp
4545
// C1017c.cpp

docs/error-messages/compiler-errors-1/fatal-error-c1018.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The `#elif` directive appears outside an `#if`, `#ifdef`, or `#ifndef` construct
1616

1717
## Example
1818

19-
The following sample generates C1018:
19+
The following example generates C1018:
2020

2121
```cpp
2222
// C1018.cpp

docs/error-messages/compiler-errors-1/fatal-error-c1019.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The `#else` directive appears outside an `#if`, `#ifdef`, or `#ifndef` construct
1616

1717
## Example
1818

19-
The following sample generates C1019:
19+
The following example generates C1019:
2020

2121
```cpp
2222
// C1019.cpp

docs/error-messages/compiler-errors-1/fatal-error-c1020.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This error can occur if you have conditional preprocessor directives before you
1818

1919
## Example
2020

21-
The following sample generates C1020:
21+
The following example generates C1020:
2222

2323
```cpp
2424
// C1020.cpp

0 commit comments

Comments
 (0)