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 › duplicate declaration
Page Index Toggle Pages: 1
duplicate declaration (Read 249 times)
duplicate declaration
Nov 16th, 2007, 8:10pm
 
why is not possible to call a function twice

for example draw or size

how do you do that?
Re: duplicate declaration
Reply #1 - Nov 16th, 2007, 8:37pm
 
When you do "void draw() {" you're not calling a function, you're defining a function, they're two completely different things.

If you define a setup function, it'll get run once when the sketch starts. If you define a draw function, then it'll get called every frame.
Page Index Toggle Pages: 1