Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 39: | Line 39: | ||
== Operators == | == Operators == | ||
The following operators are supported: | The following operators are supported: | ||
{| class="wikitable" | {| class="wikitable" style="font-size:120%" | ||
! Operator !! Description | ! Operator !! Description | ||
|- | |- | ||
| '''<big>(</big>''' open parenthesis<br/>'''<big>)</big>''' closed parenthesis || Group together a subexpression within an outer expression<br/>For example, (subexpression 1) + (subexpression 2) | | '''<big>(</big>''' open parenthesis<br/>'''<big>)</big>''' closed parenthesis || Group together a subexpression within an outer expression<br/>For example, '''<big>(</big>'''subexpression 1'''<big>)</big>''' + '''<big>(</big>'''subexpression 2'''<big>)</big>''' | ||
|- | |- | ||
| - minus<br/>+ plus || Unary number<br/>For example, -5 or +10 | | '''<big>-</big>''' minus<br/>'''<big>+</big>''' plus || Unary number<br/>For example, '''<big>-</big>'''5 or '''<big>+</big>'''10 | ||
|- | |- | ||
| '''<big>+</big>''' addition<br/>- subtraction || Binary, for numbers and strings<br/>For example, #{a} '''<big>+</big>''' #{b} '''<big>-</big>''' 1 | | '''<big>+</big>''' addition<br/>'''<big>-</big>''' subtraction || Binary, for numbers and strings<br/>For example, #{a} '''<big>+</big>''' #{b} '''<big>-</big>''' 1 | ||
|- | |- | ||
| * multiplication<br/>/ division || Binary<br/>For example, 6 / (8 * 13) | | '''<big>*</big>''' multiplication<br/>'''<big>/</big>''' division || Binary<br/>For example, 6 '''<big>/</big>''' (8 '''<big>*</big>''' 13) | ||
|- | |- | ||
| % modulus || Binary, integer remainder after division | | '''<big>%</big>''' modulus || Binary, integer remainder after division | ||
|- | |- | ||
| == equal<br/>!= not equal<br/>< less than<br/><= less than or equal<br/>> greater than<br/>>= greater than or equal || Binary, for numbers and strings | | '''<big>==</big>''' equal<br/>'''<big>!=</big>''' not equal<br/>'''<big><</big>''' less than<br/>'''<big><=</big>''' less than or equal<br/>'''<big>></big>''' greater than<br/>'''<big>>=</big>''' greater than or equal || Binary, for numbers and strings | ||
|- | |- | ||
| && and<br/>or || Binary, for TRUE and FALSE (Boolean) | | '''<big>&&</big>''' and<br/>or || Binary, for TRUE and FALSE (Boolean) | ||
|- | |- | ||
| ! not || Unary, for TRUE or FALSE (Boolean) | | '''<big>!</big>''' not || Unary, for TRUE or FALSE (Boolean) | ||
|} | |} | ||