Operator precedence: Difference between revisions
Content added Content deleted
(Copied the official precedence table into the wiki.) |
|||
Line 316: | Line 316: | ||
|} |
|} |
||
=={{header|BCPL}}== |
|||
In the table below, L indicates left associativity and R indicates right associativity. |
|||
{| class="wikitable" |
|||
! Priority !! Operator !! Notes |
|||
|- |
|||
|| 9 || Names, Literals, <code>?</code> |
|||
|- |
|||
|| || <code>TRUE</code>, <code>FALSE</code>, <code>BITSPERBCPLWORD</code> |
|||
|- |
|||
|| || (E) |
|||
|- |
|||
|| 9L || <code>SLCT</code>, <code>:</code> || Field selectors |
|||
|- |
|||
|| || Function and method calls |
|||
|- |
|||
|| || Subscripted expressions using <code>[</code> and <code>]</code> |
|||
|- |
|||
|| 8L || <code>!</code>, <code>%</code>, <code>OF</code> || Dyadic |
|||
|- |
|||
|| 7 || <code>!</code>, <code>@</code> || Prefixed |
|||
|- |
|||
|| 6L || <code>*</code>, <code>/</code>, <code>MOD</code> |
|||
|- |
|||
|| 5 || <code>+</code>, <code>-</code>, <code>ABS</code> || Dyadic and monadic |
|||
|- |
|||
|| 4 || <code>=</code>, <code>~=</code>, <code><=</code>, <code>>=</code>, <code><</code>, <code>></code> || Extended relations |
|||
|- |
|||
|| 4L || <code><<</code>, <code>>></code> || Bit shift operators |
|||
|- |
|||
|| 3 || <code>~</code> |
|||
|- |
|||
|| 3L || <code>&</code> |
|||
|- |
|||
|| 2L || <code><nowiki>|</nowiki></code> |
|||
|- |
|||
|| 1L || <code>EQV</code>, <code>XOR</code> |
|||
|- |
|||
|| 1R || <code>-> ,</code> || Conditional expression |
|||
|- |
|||
|| 0 || <code>VALOF</code>, <code>TABLE</code> |
|||
|} |
|||
=={{header|Bracmat}}== |
=={{header|Bracmat}}== |
||
Bracmat has 15 binary operators and 12 unary operators, not counting the minus |
Bracmat has 15 binary operators and 12 unary operators, not counting the minus |