Difference between revisions of "Talk:If"

Jump to navigation Jump to search
4 bytes removed ,  16:41, 26 May 2008
m
imported>HawkFest
imported>HawkFest
Line 62: Line 62:


The paragraph about [http://cs.elderscrolls.com/constwiki/index.php/If#Combining_Comparisons Combining comparisons] is confusing: « ''Note that "||" is evaluated before "&&", just like "*" is evaluated before "+" in normal algebra.'' », is an incorrect assertion:
The paragraph about [http://cs.elderscrolls.com/constwiki/index.php/If#Combining_Comparisons Combining comparisons] is confusing: « ''Note that "||" is evaluated before "&&", just like "*" is evaluated before "+" in normal algebra.'' », is an incorrect assertion:
* In arithmetic and algebra, and 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.
* In '''Common operator notation''', involving "normal" alegebra or boolean algebra, "*" is evaluated before "+", ''it has a higher precedence'' number than the "+" operator. For example, 3×4+5 = ((3×4)+5), not (3×(4+5))
* In '''Common operator notation''', involving "normal" alegebra or boolean algebra, "*" is evaluated before "+", ''it has a higher precedence'' number than the "+" operator. For example, 3×4+5 = ((3×4)+5), not (3×(4+5))
Anonymous user

Navigation menu