Skip to content

Commit 5a8e09a

Browse files
author
Colin Robertson
authored
Minimizing entity form of & (#3916)
1 parent 8505b90 commit 5a8e09a

8 files changed

Lines changed: 53 additions & 49 deletions
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
description: "Learn more about: operator &"
2+
description: "Learn more about: Microsoft Assembler (MASM) operator &"
33
title: "operator &"
44
ms.date: "12/17/2019"
55
f1_keywords: ["&", "operator &"]
66
helpviewer_keywords: ["& operator, syntax", "AND operator", "& operator"]
77
ms.assetid: f3c51a54-48ba-4b99-afed-5c45177bf694
88
---
9-
# operator `&`
9+
# operator `&` (MASM)
1010

11-
Bitwise **AND**. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
11+
Bitwise **AND**. Used only within [`.IF`](dot-if.md), [`.WHILE`](dot-while.md), or [`.REPEAT`](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
1212

1313
## Syntax
1414

15-
> *expression1* **&** *expression2*
15+
> *expression1* **`&`** *expression2*
1616
1717
## See also
1818

19-
[Operators Reference](operators-reference.md)\
20-
[MASM BNF Grammar](masm-bnf-grammar.md)
19+
[Operators reference](operators-reference.md)\
20+
[MASM BNF grammar](masm-bnf-grammar.md)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
description: "Learn more about: operator && (MASM Run Time)"
2+
description: "Learn more about: Microsoft Assembler (MASM) operator && (MASM runtime)"
33
title: "operator && (MASM Run Time)"
44
ms.date: "12/17/2019"
55
f1_keywords: ["operator &&"]
66
helpviewer_keywords: ["operator &&", "&& operator"]
77
ms.assetid: 0a633a40-114c-48f5-88ff-09bc8d9b281a
88
---
9-
# operator `&&` (MASM Run Time)
9+
# operator `&&` (MASM runtime)
1010

11-
Logical **AND**. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
11+
Logical **AND**. Used only within [`.IF`](dot-if.md), [`.WHILE`](dot-while.md), or [`.REPEAT`](dot-repeat.md) blocks and evaluated at runtime, not at assembly time.
1212

1313
## Syntax
1414

15-
> *expression1* **&&** *expression2*
15+
> *expression1* **`&&`** *expression2*
1616
1717
## See also
1818

1919
[Operators reference](operators-reference.md)\
20-
[MASM BNF Grammar](masm-bnf-grammar.md)
20+
[MASM BNF grammar](masm-bnf-grammar.md)

docs/atl/reference/cpatht-class.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ The ATL/MFC string class to use for the path (see [CStringT](../../atl-mfc-share
6060
|[CPathT::GetDriveNumber](#getdrivenumber)|Call this method to search the path for a drive letter within the range of 'A' to 'Z' and return the corresponding drive number.|
6161
|[CPathT::GetExtension](#getextension)|Call this method to get the file extension from the path.|
6262
|[CPathT::IsDirectory](#isdirectory)|Call this method to check whether the path is a valid directory.|
63-
|[CPathT::IsFileSpec](#isfilespec)|Call this method to search a path for any path-delimiting characters (for example, ':' or '\\' ). If there are no path-delimiting characters present, the path is considered to be a File Spec path.|
63+
|[CPathT::IsFileSpec](#isfilespec)|Call this method to search a path for any path-delimiting characters (for example, `:` or `\`). If there are no path-delimiting characters present, the path is considered to be a File Spec path.|
6464
|[CPathT::IsPrefix](#isprefix)|Call this method to determine whether a path contains a valid prefix of the type passed by *pszPrefix*.|
6565
|[CPathT::IsRelative](#isrelative)|Call this method to determine if the path is relative.|
6666
|[CPathT::IsRoot](#isroot)|Call this method to determine if the path is a directory root.|
6767
|[CPathT::IsSameRoot](#issameroot)|Call this method to determine whether another path has a common root component with the current path.|
6868
|[CPathT::IsUNC](#isunc)|Call this method to determine whether the path is a valid UNC (universal naming convention) path for a server and share.|
6969
|[CPathT::IsUNCServer](#isuncserver)|Call this method to determine whether the path is a valid UNC (universal naming convention) path for a server only.|
70-
|[CPathT::IsUNCServerShare](#isuncservershare)|Call this method to determine whether the path is a valid UNC (universal naming convention) share path, \\\ *server*\ *share*.|
70+
|[CPathT::IsUNCServerShare](#isuncservershare)|Call this method to determine whether the path is a valid UNC (universal naming convention) share path, *`\\server\share`*.|
7171
|[CPathT::MakePretty](#makepretty)|Call this method to convert a path to all lowercase characters to give the path a consistent appearance.|
7272
|[CPathT::MatchSpec](#matchspec)|Call this method to search the path for a string containing a wildcard match type.|
7373
|[CPathT::QuoteSpaces](#quotespaces)|Call this method to enclose the path in quotation marks if it contains any spaces.|
@@ -177,7 +177,7 @@ void BuildRoot(int iDrive);
177177
### Parameters
178178
179179
*iDrive*<br/>
180-
The drive number (0 is A:, 1 is B:, and so on).
180+
The drive number (0 is *`A:`*, 1 is *`B:`*, and so on).
181181
182182
### Remarks
183183
@@ -396,7 +396,7 @@ For more information, see [PathIsDirectory](/windows/win32/api/shlwapi/nf-shlwap
396396
397397
## <a name="isfilespec"></a> CPathT::IsFileSpec
398398
399-
Call this method to search a path for any path-delimiting characters (for example, ':' or '\\' ). If there are no path-delimiting characters present, the path is considered to be a File Spec path.
399+
Call this method to search a path for any path-delimiting characters (for example, `:` or `\`). If there are no path-delimiting characters present, the path is considered to be a File Spec path.
400400
401401
```
402402
BOOL IsFileSpec() const;

docs/cpp/address-of-operator-amp.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
---
2-
title: "Address-of Operator: &"
2+
title: "Address-of operator: &"
33
description: "The address-of operator in the C++ language."
44
ms.date: 10/02/2020
55
f1_keywords: ["&"]
66
helpviewer_keywords: ["address-of operator (&)", "& operator", "& operator [C++], address-of operator"]
77
ms.assetid: 2828221a-15f6-4acc-87fe-25e34feebb88
88
---
9-
# Address-of Operator: `&`
9+
# Address-of operator: `&`
1010

1111
## Syntax
1212

13-
> **`&`** *`cast-expression`*
13+
*`address-of-expression`*:\
14+
&emsp; **`&`** *`cast-expression`*
1415

1516
## Remarks
1617

17-
The unary address-of operator (**`&`**) takes the address of its operand. The operand of the address-of operator can be either a function designator or an l-value that designates an object that's not a bit field.
18+
The unary address-of operator (**`&`**) returns the address of (that is, a pointer to) its operand. The operand of the address-of operator can be a function designator. Or, it can be an lvalue that refers to an object that's not a bit field.
1819

19-
The address-of operator can only be applied to variables of fundamental, structure, class, or union types that are declared at the file-scope level, or to subscripted array references. In these expressions, a constant expression that doesn't include the address-of operator can be added to or subtracted from the address-of expression.
20+
The address-of operator can only be applied to certain lvalue expressions: either to variables of fundamental, structure, class, or union types, or to subscripted array references. In these expressions, a constant expression (one that doesn't include the address-of operator) can be added to or subtracted from the address-of expression.
2021

21-
When applied to functions or l-values, the result of the expression is a pointer type (an r-value) derived from the type of the operand. For example, if the operand is of type **`char`**, the result of the expression is of type pointer to **`char`**. The address-of operator, applied to **`const`** or **`volatile`** objects, evaluates to `const type *` or `volatile type *`, where `type` is the type of the original object.
22+
When applied to functions or lvalues, the result of the expression is a pointer type (an rvalue) derived from the type of the operand. For example, if the operand is of type **`char`**, the result of the expression is of type pointer to **`char`**. The address-of operator, applied to **`const`** or **`volatile`** objects, evaluates to `const type *` or `volatile type *`, where `type` is the type of the original object.
2223

23-
The address of an overloaded function can be taken only when it's clear which version of the function is being referenced. See [Function Overloading](function-overloading.md) for information about how to obtain the address of a particular overloaded function.
24+
You can only take the address of an overloaded function when it's clear which version of the function is referenced. For more information about how to obtain the address of a particular overloaded function, see [Function overloading](function-overloading.md).
2425

2526
When the address-of operator is applied to a qualified name, the result depends on whether the *qualified-name* specifies a static member. If so, the result is a pointer to the type specified in the declaration of the member. For a member that isn't static, the result is a pointer to the member *name* of the class indicated by *qualified-class-name*. For more information about *qualified-class-name*, see [Primary expressions](../cpp/primary-expressions.md).
2627

@@ -98,7 +99,7 @@ int main() {
9899

99100
## See also
100101

101-
[Expressions with Unary Operators](../cpp/expressions-with-unary-operators.md)<br/>
102-
[C++ Built-in Operators, Precedence, and Associativity](../cpp/cpp-built-in-operators-precedence-and-associativity.md)<br/>
103-
[Lvalue Reference Declarator: &](../cpp/lvalue-reference-declarator-amp.md)<br/>
104-
[Indirection and Address-of Operators](../c-language/indirection-and-address-of-operators.md)
102+
[Expressions with unary operators](../cpp/expressions-with-unary-operators.md)\
103+
[C++ built-in operators, precedence, and associativity](../cpp/cpp-built-in-operators-precedence-and-associativity.md)\
104+
[Lvalue reference declarator: `&`](../cpp/lvalue-reference-declarator-amp.md)\
105+
[Indirection and address-of operators](../c-language/indirection-and-address-of-operators.md)

docs/cpp/bitwise-and-operator-amp.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ ms.assetid: 76f40de3-c417-47b9-8a77-532f3fc990a5
1010

1111
## Syntax
1212

13-
> *expression* **`&`** *expression*
13+
*`and-expression`*:\
14+
&emsp; *`equality-expression`*\
15+
&emsp; *`and-expression`* **`&`** *`equality-expression`*
1416

1517
## Remarks
1618

1719
The bitwise AND operator (**`&`**) compares each bit of the first operand to the corresponding bit of the second operand. If both bits are 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.
1820

19-
Both operands to the bitwise AND operator must have integral types. The usual arithmetic conversions covered in [Standard Conversions](standard-conversions.md) are applied to the operands.
21+
Both operands to the bitwise AND operator must have integral types. The usual arithmetic conversions covered in [Standard conversions](standard-conversions.md) are applied to the operands.
2022

21-
## Operator keyword for &
23+
## Operator keyword for `&`
2224

2325
C++ specifies **`bitand`** as an alternative spelling for **`&`**. In C, the alternative spelling is provided as a macro in the \<iso646.h> header. In C++, the alternative spelling is a keyword; use of \<iso646.h> or the C++ equivalent \<ciso646> is deprecated. In Microsoft C++, the [`/permissive-`](../build/reference/permissive-standards-conformance.md) or [`/Za`](../build/reference/za-ze-disable-language-extensions.md) compiler option is required to enable the alternative spelling.
2426

@@ -31,14 +33,14 @@ C++ specifies **`bitand`** as an alternative spelling for **`&`**. In C, the alt
3133
#include <iostream>
3234
using namespace std;
3335
int main() {
34-
unsigned short a = 0xFFFF; // pattern 1111 ...
36+
unsigned short a = 0xCCCC; // pattern 1100 ...
3537
unsigned short b = 0xAAAA; // pattern 1010 ...
3638

37-
cout << hex << ( a & b ) << endl; // prints "aaaa", pattern 1010 ...
39+
cout << hex << ( a & b ) << endl; // prints "8888", pattern 1000 ...
3840
}
3941
```
4042

4143
## See also
4244

43-
[C++ built-in operators, precedence, and associativity](cpp-built-in-operators-precedence-and-associativity.md)<br/>
45+
[C++ built-in operators, precedence, and associativity](cpp-built-in-operators-precedence-and-associativity.md)\
4446
[C bitwise operators](../c-language/c-bitwise-operators.md)

docs/cpp/logical-and-operator-amp-amp.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ ms.assetid: 50cfa664-a8c4-4b31-9bab-2f80d7cd2d1f
1010

1111
## Syntax
1212

13-
> *expression* **`&&`** *expression*
13+
*`logical-and-expression`*:\
14+
&emsp; *`equality-expression`*\
15+
&emsp; *`logical-and-expression`* **`&&`** *`equality-expression`*
1416

1517
## Remarks
1618

17-
The logical AND operator (**&&**) returns **`true`** if both operands are **`true`** and returns **`false`** otherwise. The operands are implicitly converted to type **`bool`** before evaluation, and the result is of type **`bool`**. Logical AND has left-to-right associativity.
19+
The logical AND operator (**`&&`**) returns **`true`** if both operands are **`true`** and returns **`false`** otherwise. The operands are implicitly converted to type **`bool`** before evaluation, and the result is of type **`bool`**. Logical AND has left-to-right associativity.
1820

1921
The operands to the logical AND operator don't need to have the same type, but they must have boolean, integral, or pointer type. The operands are commonly relational or equality expressions.
2022

@@ -30,7 +32,7 @@ char *pch = 0;
3032

3133
If `pch` is null (0), the right side of the expression is never evaluated. This short-circuit evaluation makes the assignment through a null pointer impossible.
3234

33-
## Operator keyword for &&
35+
## Operator keyword for `&&`
3436

3537
C++ specifies **`and`** as an alternative spelling for **`&&`**. In C, the alternative spelling is provided as a macro in the \<iso646.h> header. In C++, the alternative spelling is a keyword; use of \<iso646.h> or the C++ equivalent \<ciso646> is deprecated. In Microsoft C++, the [`/permissive-`](../build/reference/permissive-standards-conformance.md) or [`/Za`](../build/reference/za-ze-disable-language-extensions.md) compiler option is required to enable the alternative spelling.
3638

@@ -58,5 +60,5 @@ int main() {
5860

5961
## See also
6062

61-
[C++ built-in operators, precedence, and associativity](cpp-built-in-operators-precedence-and-associativity.md)<br/>
63+
[C++ built-in operators, precedence, and associativity](cpp-built-in-operators-precedence-and-associativity.md)\
6264
[C logical operators](../c-language/c-logical-operators.md)

docs/cpp/lvalue-reference-declarator-amp.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
---
2-
description: "Learn more about: Lvalue Reference Declarator: &"
3-
title: "Lvalue Reference Declarator: &"
2+
description: "Learn more about: Lvalue reference declarator: &"
3+
title: "Lvalue reference declarator: &"
44
ms.date: "11/04/2016"
55
f1_keywords: ["&"]
66
helpviewer_keywords: ["reference operator", "& operator [C++], reference operator"]
77
ms.assetid: edf0513d-3dcc-4663-b276-1269795dda51
88
---
9-
# Lvalue Reference Declarator: `&`
9+
# Lvalue reference declarator: `&`
1010

1111
Holds the address of an object but behaves syntactically like an object.
1212

1313
## Syntax
1414

15-
```
16-
type-id & cast-expression
17-
```
15+
*`lvalue-reference-type-id`*:\
16+
&emsp;*`type-specifier-seq`* **`&`** *`attribute-specifier-seq`*<sub>opt</sub> *`ptr-abstract-declarator`*<sub>opt</sub>
1817

1918
## Remarks
2019

2120
You can think of an lvalue reference as another name for an object. An lvalue reference declaration consists of an optional list of specifiers followed by a reference declarator. A reference must be initialized and cannot be changed.
2221

2322
Any object whose address can be converted to a given pointer type can also be converted to the similar reference type. For example, any object whose address can be converted to type `char *` can also be converted to type `char &`.
2423

25-
Do not confuse reference declarations with use of the [address-of operator](../cpp/address-of-operator-amp.md). When the `&`*identifier* is preceded by a type, such as **`int`** or **`char`**, *identifier* is declared as a reference to the type. When `&`*identifier* is not preceded by a type, the usage is that of the address-of operator.
24+
Don't confuse reference declarations with use of the [address-of operator](../cpp/address-of-operator-amp.md). When the `&`*identifier* is preceded by a type, such as **`int`** or **`char`**, *identifier* is declared as a reference to the type. When `&`*identifier* is not preceded by a type, the usage is that of the address-of operator.
2625

2726
## Example
2827

@@ -65,7 +64,7 @@ Bill is 40
6564

6665
## See also
6766

68-
[References](../cpp/references-cpp.md)<br/>
69-
[Reference-Type Function Arguments](../cpp/reference-type-function-arguments.md)<br/>
70-
[Reference-Type Function Returns](../cpp/reference-type-function-returns.md)<br/>
71-
[References to Pointers](../cpp/references-to-pointers.md)
67+
[References](../cpp/references-cpp.md)\
68+
[Reference-type function arguments](../cpp/reference-type-function-arguments.md)\
69+
[Reference-type function returns](../cpp/reference-type-function-returns.md)\
70+
[References to pointers](../cpp/references-to-pointers.md)

docs/parallel/concrt/reference/concurrency-namespace-operators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ms.assetid: 8e373f23-fc8e-49f7-82e6-ba0c57b822f8
2626
:::column-end:::
2727
:::row-end:::
2828

29-
## <a name="operator_lor"></a> operator&#124;&#124; Operator
29+
## <a name="operator_lor"></a> `operator||` Operator
3030

3131
Creates a task that will complete successfully when either of the tasks supplied as arguments completes successfully.
3232

@@ -70,7 +70,7 @@ A task that completes successfully when either of the input tasks has completed
7070

7171
If both of the tasks are canceled or throw exceptions, the returned task will complete in the canceled state, and one of the exceptions, if any are encountered, will be thrown when you call `get()` or `wait()` on that task.
7272

73-
## <a name="operator_amp_amp"></a> operator&& Operator
73+
## <a name="operator_amp_amp"></a> `operator&&` Operator
7474

7575
Creates a task that will complete successfully when both of the tasks supplied as arguments complete successfully.
7676

0 commit comments

Comments
 (0)