mirror of
https://github.com/golang/go
synced 2024-11-22 00:54:43 -07:00
bit clear: &^ and &^=
R=gri DELTA=5 (3 added, 0 deleted, 2 changed) OCL=26155 CL=26157
This commit is contained in:
parent
bb02e481d2
commit
cd04ec95ea
@ -297,6 +297,7 @@ The following character sequences represent operators, delimiters, and other spe
|
||||
* ^ *= ^= <- > >= { }
|
||||
/ << /= <<= ++ = := , ;
|
||||
% >> %= >>= -- ! ... . :
|
||||
&^ &^=
|
||||
</pre>
|
||||
|
||||
<h3>Integer literals</h3>
|
||||
@ -2416,7 +2417,7 @@ log_op = "||" | "&&" .
|
||||
com_op = "<-" .
|
||||
rel_op = "==" | "!=" | "<" | "<=" | ">" | ">=" .
|
||||
add_op = "+" | "-" | "|" | "^" .
|
||||
mul_op = "*" | "/" | "%" | "<<" | ">>" | "&" .
|
||||
mul_op = "*" | "/" | "%" | "<<" | ">>" | "&" | "&^" .
|
||||
|
||||
unary_op = "+" | "-" | "!" | "^" | "*" | "&" | "<-" .
|
||||
</pre>
|
||||
@ -2460,7 +2461,7 @@ operators, comparison operators, communication operators,
|
||||
|
||||
<pre class="grammar">
|
||||
Precedence Operator
|
||||
6 * / % << >> &
|
||||
6 * / % << >> & &^
|
||||
5 + - | ^
|
||||
4 == != < <= > >=
|
||||
3 <-
|
||||
@ -2505,6 +2506,7 @@ to strings; all other arithmetic operators apply to integers only.
|
||||
& bitwise and integers
|
||||
| bitwise or integers
|
||||
^ bitwise xor integers
|
||||
&^ bitwise nand integers
|
||||
|
||||
<< left shift integer << unsigned integer
|
||||
>> right shift integer >> unsigned integer
|
||||
@ -3021,6 +3023,7 @@ x = 1
|
||||
*p = f()
|
||||
a[i] = 23
|
||||
k = <-ch
|
||||
i &^= (1<<n)
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
|
Loading…
Reference in New Issue
Block a user