+ 2

Is it right that compiler also follow the BODMAS rule?

18th May 2020, 11:53 AM
Saurabh
Saurabh - avatar
6 odpowiedzi
+ 3
From a design perspective, it's better to follow the said BODMAS rule because people are more used to it. Another reason is that it's the foundation of mathematics.
18th May 2020, 2:42 PM
luʁi
+ 2
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 OP asked if it is alright for a compiler to follow the BODMAS rule.
18th May 2020, 2:45 PM
luʁi
+ 2
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 OP = Original Poster or something along those lines. What I was saying is that the reason most programming languages follow the said BODMAS rule is because people are more used to it, the precedence and associativity of the operations. Another reason is that BODMAS is one of the foundation of mathematics.
18th May 2020, 2:51 PM
luʁi
+ 2
Hahha seems like everyone got their points. OP and LP (LOCAL POSTER) 😂
18th May 2020, 2:55 PM
Saurabh
Saurabh - avatar
+ 1
Ok and what does elif means?
18th May 2020, 12:00 PM
Saurabh
Saurabh - avatar
+ 1
Yes because everywhere is BODMAS rules are applying whatever that is Maths or programming we can use BODMAS
18th May 2020, 2:50 PM
Saurabh
Saurabh - avatar