while ... wend in Tcl Please contribute to this section Don't be silly. while {some_expression_is_true} { do stuff } That's it. ---- [RS] 2005-10-17: [While] this page is not really topical to [Tcl], it illustrates the first generation, if you will, of denoting blocks in programming languages. 0. The oldest languages (Assembler, Fortran etc.) didn't have explicit blocks at all. Only with JMP/GOTO could branching over parts of code be accomplished. 1. ALGOL introduced keywords to mark beginning and end of blocks, where the closing keyword often was the beginning keyword in reverse: if ... fi do ... od I think Unix shells extended this to ''case ... esac'' (but used ''do .. done'' for a change), but nobody seems to have used ''elihw'' for an end of while loop. Instead, some other combinations were introduced: for ... next if ... endif (or End If in VB) Do ... Loop (VB) Select Case ... End Case While ... Wend (VB) 2. The [Pascal] language introduced a more orderly grouping, in which ''begin .. end'' were put around every block, no matter if part of a control structure, a function body, etc. 3. Finally (?), [C] simplified this to just use braces: { ... }, and Tcl follows that simplest of all methods. ''([DKF]: Though the use of braces means something else strictly (a particular style of quoting). It just happens to make working with "blocks" incredibly natural.)'' ---- [Category Control Structure]