Reference   Language (extended) | Libraries | Comparison

continue

continue is used to bypass portions of code in a do, for, or while loop. It forces the conditional expression to be evaluated, without terminating the loop.

Example


for (x = 0; x < 255; x ++)
{
    if (x > 40 && x < 120){      // create jump in values
        continue;
    }

    digitalWrite(PWMpin, x);
    delay(50);
}

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.