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

  1. + Addition
  2. - Subtraction
  3. * Multiplication
  4. / Division
  5. ++ Pre or post fix addition
  6. -- Pre or post fix subtraction
  7. << Bit shift to left
  8. >> Bit shift to right
  9. == Test for equality
  10. != Test for inverse equality
  11. ! Logical negation
  12. ( ) Function call or expression parentheses
  13. [ ] Array element access
  14. . Member access
  15. < Test lvalue is smaller than rvalue
  16. > Test lvalue is greater than rvalue
  17. <= Test lvalue is smaller or equal to rvalue
  18. >= Test lvalue is greater or equal to rvalue
  19. ?: Inline if operator
  20. ||| Logical short circuit OR
  21. && Logical short circuit AND
  22. | Logical OR
  23. & Logical AND
  24. += Plus assignment
  25. -= Subtraction assignment
  26. *= Multiplication assignment
  27. /= Division assignment
  28. %= Modulus assignment