Binary operations: Difference between revisions
Jump to navigation
Jump to search
(edit) |
(edit) |
||
| Line 3: | Line 3: | ||
Below is the list of binary operators: | Below is the list of binary operators: | ||
{| | |||
|-valign="top" | |||
''':=''' | |width="10%"|'''Operator'''|| '''Effect''' | ||
|-valign="top" | |||
|width="10%"|'''='''||may be used for assignment or comparing 2 values like the '''==''' operator | |||
|-valign="top" | |||
|width="10%"|''':='''||forced assignment | |||
'''<>''' | |-valign="top" | ||
|width="10%"|'''<>'''||not equal | |||
|-valign="top" | |||
|width="10%"|'''&'''||concatenation of strings | |||
|-valign="top" | |||
'''&''' | |width="10%"|'''*'''||multiplication | ||
|-valign="top" | |||
|width="10%"|'''*='''||multiplication/assignment | |||
|-valign="top" | |||
|width="10%"|'''+'''||addition | |||
'''*''' | |-valign="top" | ||
|width="10%"|'''+='''||addition/assignment | |||
|-valign="top" | |||
|width="10%"|'''-'''||subtraction | |||
|-valign="top" | |||
'''*=''' | |width="10%"|'''-='''||subtraction/assignment | ||
|-valign="top" | |||
|width="10%"|'''/'''||division | |||
|-valign="top" | |||
|width="10%"|'''/='''||division/assignment | |||
'''+''' | |-valign="top" | ||
|width="10%"|'''<'''||less than | |||
|-valign="top" | |||
|width="10%"|'''<='''||less than or equal to | |||
|-valign="top" | |||
'''+=''' | |width="10%"|'''=='''||equality | ||
|-valign="top" | |||
|width="10%"|'''>'''||more than | |||
|-valign="top" | |||
|width="10%"|'''>='''||more than or equal to | |||
'''-''' | |-valign="top" | ||
|width="10%"|'''and'''||logical AND | |||
|-valign="top" | |||
|width="10%"|'''or'''||logical OR | |||
|} | |||
'''-=''' | |||
'''/''' | |||
'''/=''' | |||
'''<''' | |||
'''<=''' | |||
== | |||
'''>''' | |||
'''>=''' | |||
'''and''' | |||
'''or''' | |||
Revision as of 17:53, 8 January 2012
A binary operator is an operator which takes 2 arguments, as opposed to a unary operators, which take 1 argument.
Below is the list of binary operators:
| Operator | Effect |
| = | may be used for assignment or comparing 2 values like the == operator |
| := | forced assignment |
| <> | not equal |
| & | concatenation of strings |
| * | multiplication |
| *= | multiplication/assignment |
| + | addition |
| += | addition/assignment |
| - | subtraction |
| -= | subtraction/assignment |
| / | division |
| /= | division/assignment |
| < | less than |
| <= | less than or equal to |
| == | equality |
| > | more than |
| >= | more than or equal to |
| and | logical AND |
| or | logical OR |