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 & HelpSyntax Questions › Odd start with Processing book
Page Index Toggle Pages: 1
Odd start with Processing book (Read 451 times)
Odd start with Processing book
Jan 31st, 2008, 5:06pm
 

So, I hate to sound like an idiot here, but I've run into a very basic problem. I bought this book, "Processing: Creative Coding and Computational Art." by Ia Greenberg hoping to learn programming and combine it with Arduino and then move on to learning C++. Anyway, I've started the journey and I've already run into a snag.

The book tells me to run a very very basic program

size(400, 400);
background(255);
noStroke();
fill(0);
rect(width/4. height/4, width/2, height/2);

and yet, my tiny little black rectangle isn't coming up. Instead, I get a syntax error that says "maybe missing a parenthesis?" and then expecting RPAREN, found 'height'. Now I copied the program to the letter. So can someone tell me what I'm doing wrong? I'd greatly appreciate it. Thank you.
Re: Odd start with Processing book
Reply #1 - Jan 31st, 2008, 5:11pm
 
hahahaha nevermind. I had a period there. Jumped the gun. Sorry.
Re: Odd start with Processing book
Reply #2 - Jan 31st, 2008, 5:59pm
 
Yeah, sometimes you first have to post your things to the Discourse to see the error.
Re: Odd start with Processing book
Reply #3 - Feb 1st, 2008, 12:04pm
 
Even though this is a simple example, I find most people discover their own bugs simply by trying to explain it to somebody else. It somehow causes the logic to be run through a different section of your brain when you try to verbalize your own technique.
Page Index Toggle Pages: 1