We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
example error report (Read 461 times)
example error report
May 17th, 2007, 9:29pm
 
Operator_Precedence
by REAS

If you don't explicitly state the order in which
an expression is evaluated, they are evaluated based
on the operator precedence. For example, in the statement
"4 + 28"(<---should be 4+2*8), the 2 will first be multiplied by 8 and then the result will
be added to 4. This is because the "*" has a higher precedence
than the "+". To avoid ambiguity in reading the program,
it is recommended that is statement is written as "4 + (28)(<---should be 4+(2*8)), ".
The order of evaluation can be controlled through placement of
parenthesis in the code. A table of operator precedence follows below.

Created 17 January 2003
Page Index Toggle Pages: 1