Operator precedence: Difference between revisions

Operator precedence en BASIC256
mNo edit summary
(Operator precedence en BASIC256)
Line 302:
# **= exponentiation assignment (not all awk's)
</lang>
 
=={{header|BASIC256}}==
Operators are evaluated according to a strict set of rules.
These rules are called the “Order of Operations”.
 
{| class="wikitable"
! Priority || Operator(s) || Category/Description
|-
| ALIGN=CENTER|highest || () ||Grouping
|-
| ALIGN=CENTER|10 || ^ ||Exponent
|-
| ALIGN=CENTER| 9 || - ~ ||Unary Minus and Bitwise Negation (NOT)
|-
| ALIGN=CENTER| 8 || * / \ ||Multiplication, Division, and Integer Division
|-
| ALIGN=CENTER| 7 || % ||Integer Remainder (Mod)
|-
| ALIGN=CENTER| 6 || + - ; ||Addition/Concatenation, and Subtraction
|-
| ALIGN=CENTER| 5 || & <nowiki>|</nowiki> ||Bitwise And and Bitwise Or
|-
| ALIGN=CENTER| 4 || < <= > >= = <> ||Comparison (Numeric and String)
|-
| ALIGN=CENTER| 3 || NOT ||Logical Not
|-
| ALIGN=CENTER| 2 || AND ||Logical And
|-
| ALIGN=CENTER| 1 || OR ||Logical Or
|-
| ALIGN=CENTER|lowest || XOR ||Logical Exclusive Or
|}
 
 
=={{header|bc}}==
2,122

edits