by Dahl in 1972: loop loop xxx1 read(char); while test; while not atEndOfFile; xxx2 write(char); repeat; repeat; If xxx1 is omitted, we get a loop with the test at the top (a traditional while loop). If xxx2 is omitted, we get a loop with the test at the bottom, equivalent to a do while loop in many languages. If while is omitted, we get an infinite loop. The construction here can be thought of as a do loop with the while check in the middle. Hence this single construction can replace several constructions in most programming languages. Languages lacking this construct generally emulate it using an equivalent infinite-loop-with-break idiom: while (true) { xxx1 if (not test) break xxx2 } A possible variant is to allow more than one while test; within the loop, but the use of exitwhen (see next section) appears to cover this case better. In Ada, the above loop construct (loop-while-repeat) can be represented using a standard infinite loop (loop - end loop) that has an exit when clause in the middle (not to be confused with the exitwhen statement in the following section). with Ada.Text_IO; with Ada.Integer_Text_IO; procedure Print_Squares is X : Integer; begin Read_Data : loop Ada.Integer_Text_IO.Get(X); exit Read_Data when X = 0; Ada.Text IO.Put (X * X); Ada.Text IO.New_Line; end loop Read_Data; end Print_Squares; Naming a loop (like Read_Data in this example) is optional but permits leaving the outer loop of several nested loops. Multiple early exit/exit from nested loops This was proposed by Zahn in 1974. A modified version is presented here. exitwhen EventA or EventB or EventC; xxx exits EventA: actionA EventB: actionB EventC: actionC endexit; exitwhen is used to specify the events which may occur within xxx, their occurrence is indicated by using the name of the event as a statement. When some event does occur, the relevant action is carried out, and then control passes just after endexit. This construction provides a very clear separation between determining that some situation applies, and the action to be taken for that situation. exitwhen is conceptually similar to exception handling, and exceptions or similar constructs are used for this purpose in many languages. The following simple example involves searching a two-dimensional table for a particular item. exitwhen found or missing; for I := 1 to N do for J := 1 to M do if table[I,J] = target then found; missing; exits found: