Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v3:expressions [2023/09/03 08:53] – neils | v3:expressions [2024/07/30 22:51] (current) – neils | ||
---|---|---|---|
Line 2: | Line 2: | ||
When no parentheses are present, arithmetic expressions are evaluated from left to right, with multiplication and division having a higher priority than addition and subtraction. | When no parentheses are present, arithmetic expressions are evaluated from left to right, with multiplication and division having a higher priority than addition and subtraction. | ||
+ | |||
+ | The following table explains operator precedence in XC=BASIC: | ||
| Highest | | Highest | ||
Line 9: | Line 11: | ||
| Lowest | | Lowest | ||
- | The arithmetic operators, '' | + | The arithmetic operators, '' |
PRINT 5/2 ' Outputs 2 | PRINT 5/2 ' Outputs 2 |