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 › Question about delay()
Page Index Toggle Pages: 1
Question about delay() (Read 273 times)
Question about delay()
Dec 6th, 2008, 7:08pm
 
<newbie>
<Foreign language>

Hello!

I have a question to the delay-statement.

The simple code below doesn't wait 6
seconds before drawing.

Why is that so?

Besides: If I want to wait
30 Minutes, can I still work with int
or what type do I have to use that
allows for greater values?

Is their a beep-sound or something
as in Visual Basic?

Is there a MsgBox as in Visual Basic?
Thanks,

All Help is appreciated.

Greetings,

Chris


size(200, 200);
background(0);

int a1;

a1 = 1000 * 6;

println("Wait");
delay ( a1 );
println("End wait");


for(int i=10; i<width; i+=10) {
 // If 'i' divides by 20 with no remainder draw the first line
 // else draw the second line
 if(i%20 == 0) {
   stroke(153);
   line(i, 40, i, height/2);
 } else {
   stroke(102);
   line(i, 20, i, 180);
 }
}


Page Index Toggle Pages: 1