|
Author |
Topic: case statements (Read 539 times) |
|
michael
|
case statements
« on: Dec 12th, 2002, 6:27am » |
|
any thought on including case statements in p5?
|
In the beginning, the universe was created. This made a lot of people very angry, and has been widely regarded as a bad idea.
-- Douglas Adams in The Hitchhiker's Guide to the Universe.
|
|
|
Glen Murphy
|
Re: case statements
« Reply #1 on: Dec 12th, 2002, 7:21am » |
|
They're already in there - it's Java, so anything Java supports is generally in P5. Crude example below. Code:int i = 0; void setup() { size(100,100); } void loop() { switch(i%2) { case 0: background(#000000); break; case 1: background(#ffffff); break; } i++; } |
|
|
« Last Edit: Dec 12th, 2002, 7:21am by Glen Murphy » |
|
|
|
|
|