repeat

A '''repeat loop''' is a [conditional loop] that repeatedly executes a block of instructions whilst the condition is true. The do statement is used together with an [while] syntactical cocomponent to produce a repeat loop:

BEGIN { attempts = 1 do { print "Knock! Knock!" attempts = attempts + 1 } while( attempts <= 10) }

_The block of code within a repeat loop will always run at least once_

Note than unlike [while] loops, with a repeat loop, the [condition] is evaluated after the [block] of code within the loop. This means that the [block] of code within a repeat loop will always run at least once.