List of Operators
源自於http://only-vlsi.blogspot.com/2008/01/list-of-operators.html#eoLogical Operators
Symbol | Description | #Operators |
! | Logical negation | One |
|| | Logical OR | Two |
&& | Logical AND | Two |
Relational Operators
Symbol | Description | #Operators |
> | Greater than | Two |
< | Less than | Two |
>= | Greater than or equal to | Two |
<= | Less than or equal to | Two |
Equality Operators
Symbol | Description | #Operators |
== | Equality | Two |
!= | Inequality | Two |
=== | Case equality | Two |
!== | Case inequality | Two |
Arithmetic Operators
Symbol | Description | #Operators |
+ | Add | Two |
- | Substract | Two |
* | Multiply | Two |
/ | Divide | Two |
** | Power | Two |
% | Modulus | Two |
Bitwise Operators
Symbol | Description | #Operators |
~ | Bitwise negation | One |
& | Bitwise AND | Two |
| | Bitwise OR | Two |
^ | Bitwise XOR | Two |
^~ or ~^ | Bitwise XNOR | Two |
Reduction Operators
Symbol | Description | #Operators |
& | Reduction AND | One |
~& | Reduction NAND | One |
| | Reduction OR | One |
~| | Reduction NOR | One |
^ | Reduction XOR | One |
^~ or ~^ | Reduction XNOR | One |
Shift Operators
Symbol | Description | #Operators |
>> | Right shift | Two |
<< | Left shift | Two |
>>> | Arithmetic right shift | Two |
<<< | Arithmetic left shift | Two |
Conditional Operators
Symbol | Description | #Operators |
?: | Conditional | Two |
Replication Operators
Symbol | Description | #Operators |
{ { } } | Replication | > One |
Concatenation Operators
Symbol | Description | #Operators |
{ } | Concatenation | > One |
Operator Precedence
沒有留言:
張貼留言