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