Difference between revisions of "Talk:If"
→A confusing text
imported>HawkFest |
imported>HawkFest |
||
Line 61: | Line 61: | ||
== A confusing text == | == A confusing text == | ||
The paragraph about [http://cs.elderscrolls.com/constwiki/index.php/If#Combining_Comparisons Combining comparisons] | The paragraph about [http://cs.elderscrolls.com/constwiki/index.php/If#Combining_Comparisons Combining comparisons]: « ''Note that "||" is evaluated before "&&", just like "*" is evaluated before "+" in normal algebra.'' » is a confusing argument, and should give an explanation of major consequences: | ||
* In arithmetic and algebra, from the earliest use of mathematical notation, multiplication took precedence over addition. The standard order of operators is: 1-exponents and roots; 2-multiplication and division; 3-addition and subtraction. | * In arithmetic and algebra, from the earliest use of mathematical notation, multiplication took precedence over addition. The standard order of operators is: 1-exponents and roots; 2-multiplication and division; 3-addition and subtraction. | ||
* In terms of computing, we're talking about '''precedence''' here. The precedence is a number order, and operator precedence is usually ordered with the corresponding number order. For expressions where two operators of different precedences compete for the same operand, the operator with the higher precedence wins. | * In terms of computing, we're talking about '''precedence''' here. The precedence is a number order, and operator precedence is usually ordered with the corresponding number order. For expressions where two operators of different precedences compete for the same operand, the operator with the higher precedence wins. |