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.
IndexProgramming Questions & HelpPrograms › Re: Processing syntax problems. Please help
Page Index Toggle Pages: 1
Re: Processing syntax problems. Please help (Read 569 times)
Re: Processing syntax problems. Please help
May 2nd, 2009, 6:51am
 
I wonder where this come from... Smiley
Anyway, put the members (Nums to BG) on top, content of Assign2_1() just below, setup() as it is, and it should work.
Re: Processing syntax problems. Please help
Reply #1 - May 2nd, 2009, 9:25am
 
You kept too much stuff. I meant something like that:
Code:
 int Nums[] = {
6, 14, 8, 9, 2, 3, 4, 2, 8, 3,
9, 2, 0, 5
};
int SquareSide;
int Rank;
int Side;
int Green;
int Yellow;
int BG;

SquareSide = 20;
Rank = Nums.length;
Side = SquareSide * Rank;
Green = color(0, 255, 0);
Yellow = color(255, 255, 0);
BG = Yellow;

public void setup()
{
size(Side, Side);
background(BG);
fill(Green);
for(int i = 0; i < Rank; i++)
rect(i * SquareSide, 0.0F, SquareSide, SquareSide * Nums[i]);

}
Page Index Toggle Pages: 1