| Language \ Environment \ Comparison |

| Index

| The Processing 1.0 _ALPHA_ Reference is a work in progress. If you see any errors or have any comments, please write to: reas at groupc.net

Name |  | ### setup()
Examples |  |
    void setup() {
      size(200, 200);
      background(0);
      noStroke();
      fill(102);
    }

    int a = 0;

    void loop() {
      rect(a++%width, 10, 2, 80);
    }
Description |  | Function called once when the program begins running. Used to define initial enviroment properties such as screen size, background color, loading images, etc. before the loop() begins executing. Variables declared within setup() are not accessible within loop().
Syntax |  |
    void setup() {
      statements
    }
Parameters |  |
statements |  | any valid statements
Returns |  | None
Usage |  | Web & Application
Related |  | loop() size()

| © 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea |
| Processing is an open project initiated by Ben Fry and Casey Reas |