Loop structures: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: added the REXX language for a N times loop.)
(fixing broken links)
Line 13: Line 13:
;Iterative loops:
;Iterative loops:


An [[:Category:Iteration|iterative loop]] repeatedly executes a set of instructions as the iterator steps through a series of values. Types of iterative loops include [[forloop]]s and [[foreach]] loops. An iterative loop is a repetition but with a variable dependent on the current iteration. This allows the looped procedure to vary slightly between iterations. For example, the same operation can be carried out on each iteration, but each time on a different object.
An [[:Category:Iteration|iterative loop]] repeatedly executes a set of instructions as the iterator steps through a series of values. Types of iterative loops include [[for loop]]s and [[foreach]] loops. An iterative loop is a repetition but with a variable dependent on the current iteration. This allows the looped procedure to vary slightly between iterations. For example, the same operation can be carried out on each iteration, but each time on a different object.


;Conditional loops:
;Conditional loops:
A [[conditional loop]] tests for a condition around the loop, and repeatedly executes a block of [[instruction]]s whilst the [[condition]] is true. Types of [[conditional loop]]s include [[while]] loops and [[until]] loops.
A [[conditional loop]] tests for a condition around the loop, and repeatedly executes a block of [[instruction]]s whilst the [[condition]] is true. Types of [[conditional loop]]s include [[while loop]]s and [[do-while loop]]s.


'''Examples here should be migrated to an appropriate [[:Category:Iteration|Iteration]] page and removed from here. If a page does not exist demonstrating a particular loop structure, discuss it [[:Category talk:Iteration|here]].'''
'''Examples here should be migrated to an appropriate [[:Category:Iteration|Iteration]] page and removed from here. If a page does not exist demonstrating a particular loop structure, discuss it [[:Category talk:Iteration|here]].'''