What about a priority of using and,or? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What about a priority of using and,or?

10th Feb 2017, 3:02 PM
Š•Š²Š³ŠµŠ½ŠøŠ¹ Š“Ń€ŠøшŠµŠ½ŠŗŠ¾
Š•Š²Š³ŠµŠ½ŠøŠ¹ Š“Ń€ŠøшŠµŠ½ŠŗŠ¾ - avatar
2 Respostas
+ 1
Basically the priority is for the AND operator but it depends on the programming language. Through my entire experience, I've always noticed that the expressions are evaluated by giving the priority to AND (&&). But if you are not convinced and want to be cautious, I recommend you to use the parentheses.
10th Feb 2017, 5:11 PM
Hocine Rebatchi
Hocine Rebatchi - avatar
+ 1
And or, if else, do while, the general rule is true false.
10th Feb 2017, 7:50 PM
Andre van Rensburg
Andre van Rensburg - avatar