Binary operations: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
 (edit)  | 
				 (edit)  | 
				||
| Line 18: | Line 18: | ||
|width="10%"|'''*'''||multiplication  | |width="10%"|'''*'''||multiplication  | ||
|-valign="top"  | |-valign="top"  | ||
|width="10%"|'''*='''||multiplication  | |width="10%"|'''*='''||multiplication of the left operand by the right operand followed by assignment of the result to the left operand  | ||
|-valign="top"  | |-valign="top"  | ||
|width="10%"|'''+'''||addition  | |width="10%"|'''+'''||addition  | ||
|-valign="top"  | |-valign="top"  | ||
|width="10%"|'''+='''||addition  | |width="10%"|'''+='''||addition of the left operand to the right operand followed by assignment of the result to the left operand  | ||
|-valign="top"  | |-valign="top"  | ||
|width="10%"|'''-'''||subtraction  | |width="10%"|'''-'''||subtraction  | ||
|-valign="top"  | |-valign="top"  | ||
|width="10%"|'''-='''||subtraction  | |width="10%"|'''-='''||subtraction of the right operand from the left operand followed by assignment of the result to the left operand  | ||
|-valign="top"  | |-valign="top"  | ||
|width="10%"|'''/'''||division  | |width="10%"|'''/'''||division  | ||
|-valign="top"  | |-valign="top"  | ||
|width="10%"|'''/='''||division  | |width="10%"|'''/='''||division of the left operand by the right operand followed by assignment of the result to the left operand  | ||
|-valign="top"  | |-valign="top"  | ||
|width="10%"|'''<'''||less than  | |width="10%"|'''<'''||less than  | ||
Revision as of 17:56, 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 of the left operand by the right operand followed by assignment of the result to the left operand | 
| + | addition | 
| += | addition of the left operand to the right operand followed by assignment of the result to the left operand | 
| - | subtraction | 
| -= | subtraction of the right operand from the left operand followed by assignment of the result to the left operand | 
| / | division | 
| /= | division of the left operand by the right operand followed by assignment of the result to the left operand | 
| < | less than | 
| <= | less than or equal to | 
| == | equality | 
| > | more than | 
| >= | more than or equal to | 
| and | logical AND | 
| or | logical OR |