Loop structures: Difference between revisions

(→‎[[C plus plus|C++]]: rm duplicate do-while entry, rm extra === Run-Time Control Structures === heading)
Line 224:
example: counts down from a given number to one
: COUNTDOWN ( n -- ) BEGIN DUP WHILE CR DUP . 1- REPEAT DROP ;
Additional WHILE clauses may be added to a loop, but each extra WHILE requires a matching THEN after the REPEAT.
 
===Mixed Structures===
Anonymous user