| 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 |  | ### loop()
Examples |  |
    void setup() {
      size(200, 200);
      noStroke();
    }

    int a = 0;

    void loop() {
      fill(a);
      a = a + 1;
      if (a > width) {
        a = 0;
      }
      rect(a, 0, 2, 200);
    }
Description |  | Continuously executes the lines of code contained inside its block until the program is stopped. The loop() function is used in conjunction with setup(). The number of times loop() executes in each second may be controlled with the delay() and framerate() functions.
Syntax |  |
    loop() {
      statements
    }
Parameters |  |
statements |  | A sequence of statements to be executed over and over again
Returns |  | None
Usage |  | Web & Application
Related |  | setup()

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