Category talk:Conditional loops

From Rosetta Code

Interestingly I see only two loop variants:

  1. Loops/Do-while
  2. Loops/While

The first loop construct tests a condition after execution of a block of statements to decide if to execute the block again. The second loop construct tests a condition before and will only execute a block of statements if the test is passed. A third loop construct could be to test a condition before and a condition after a block of statements.

pseudo code <lang pascal>while condition_before


until condition_after</lang> The condition after will only be tested after the block of statements has been executed once. So I propose a new task:

  1. Loops/While Until

Dedalus (talk) 13:24, 30 March 2017 (UTC)