5.7 Exit Statements
Syntax
Name Resolution Rules
Legality Rules
Dynamic Semantics
8  Several nested loops can be exited by 
an 
exit_statement 
that names the outer loop. 
 
Examples
Examples of loops with exit statements: 
for N in 1 .. Max_Num_Items loop
   Get_New_Item(New_Item);
   Merge_Item(New_Item, Storage_File);
   exit when New_Item = Terminal_Item;
end loop;
Main_Cycle:
   loop
      --  initial statements
      exit Main_Cycle when Found;
      --  final statements
   end loop Main_Cycle;
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe