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
typo (Read 1572 times)
typo
Feb 1st, 2007, 12:24am
 
condition : expression1 ? expression2

should be


condition ? expression1 : expression2

here

http://processing.org/reference/conditional.html
Re: typo
Reply #1 - Feb 2nd, 2007, 4:05pm
 
got it, thanks.
Re: typo
Reply #2 - Aug 10th, 2007, 7:53am
 
the example code for ?: seems to be missing the inequalities.

int s = 0;
for(int i = 5; i  100; i += 5) {
 s = (i  50) ? 0 : 255;
 stroke(s);
 line(30, i, 80, i);
}
Re: typo
Reply #3 - Sep 16th, 2007, 11:01pm
 
Thank you. It's fixed.
Page Index Toggle Pages: 1