Difference between revisions of "Operators"
From Mesham
Jump to navigationJump to search (→Operators) |
(→Operators) |
||
Line 19: | Line 19: | ||
#>= Test lvalue is greater or equal to rvalue | #>= Test lvalue is greater or equal to rvalue | ||
#?: Inline if operator | #?: Inline if operator | ||
− | #|| Logical OR | + | #||| Logical short circuit OR |
− | #&& Logical AND | + | #&& Logical short circuit AND |
+ | #| Logical OR | ||
+ | #& Logical AND | ||
#+= Plus assignment | #+= Plus assignment | ||
#-= Subtraction assignment | #-= Subtraction assignment |
Revision as of 13:04, 20 December 2013
Operators
- + Addition
- - Subtraction
- * Multiplication
- / Division
- ++ Pre or post fix addition
- -- Pre or post fix subtraction
- << Bit shift to left
- >> Bit shift to right
- == Test for equality
- != Test for inverse equality
- ! Logical negation
- ( ) Function call or expression parentheses
- [ ] Array element access
- . Member access
- < Test lvalue is smaller than rvalue
- > Test lvalue is greater than rvalue
- <= Test lvalue is smaller or equal to rvalue
- >= Test lvalue is greater or equal to rvalue
- ?: Inline if operator
- ||| Logical short circuit OR
- && Logical short circuit AND
- | Logical OR
- & Logical AND
- += Plus assignment
- -= Subtraction assignment
- *= Multiplication assignment
- /= Division assignment
- %= Modulus assignment