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
error in Return (Read 2012 times)
error in Return
Jun 18th, 2009, 7:24am
 
it shoulb like this :

int[] vals = {10, 20, 30};
 
void draw() {
 int[] t = timestwo(vals);
 println(t);
 noLoop();
}

int[] timestwo(int[] dVals) {
 for(int i = 0; i < dVals.length; i++) {
   dVals[i] = dVals[i] * 2;
 }
 return dVals;
}

//  instead of :  for(int i = 0; i  dVals.length; i++)  Shocked
Re: error in Return
Reply #1 - Jun 18th, 2009, 7:37am
 
Reference is made (AFAIK) from an XML document and in general it seems to eat the < (and perhaps >), probably because they are raw (unescaped).
It might need a pass to globally catch all these... Smiley (that's not the first I see)
Re: error in Return
Reply #2 - Oct 18th, 2009, 9:41am
 
Yes, as PhiLho states, that's exactly the bug. This will be fixed with the next update. Thank you for the report.
Page Index Toggle Pages: 1