Language - Loop (For, While) - (Break, Continue)

> Code - (Programming|Computer) Language > Code - Grammar (Lexical)

1 - About

Repeating a set of actions until a certain condition fails is the job of programming loops;

loops can take different forms, but they all satisfy this basic behavior.

A loop includes:

Each time the loop block executes, that’s called an iteration. See Design Pattern - (Iterator|Cursor)

The only practical difference between these loops is whether the conditional is tested before the first iteration (while) or after the first iteration (do.. while).

  • The break statement stop a loop.
  • The continue statement goes to the next iteration without running the code below it.
Advertising

3 - Infinite

4 - Documentation / Reference

code/grammar/loop.txt · Last modified: 2019/01/11 18:54 by gerardnico