0

Y it's given that ==has higher precidence thn other

22nd May 2019, 7:53 AM
Vishal Pai
Vishal Pai - avatar
5 odpowiedzi
+ 3
You know that in arithmetics, * and / are calculated before + and -, right? It's basically the same, just more of that. Every language has such an order of evaluation. For Python look here under operator precedence: https://docs.python.org/3/reference/expressions.html
22nd May 2019, 8:16 AM
HonFu
HonFu - avatar
+ 6
That's just how a language works. In Python for example, the code is tokenized before certain tokens are combined and evaluated.
22nd May 2019, 8:05 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
The precedence of operators is different between languages. Which language are you talking about?
22nd May 2019, 8:04 AM
HonFu
HonFu - avatar
22nd May 2019, 8:05 AM
Vishal Pai
Vishal Pai - avatar
0
Comparison operators have often quite low precedence. Higher than logical operators and assignment operators, but lower than arithmetic operators.
22nd May 2019, 10:23 AM
Seb TheS
Seb TheS - avatar