20. Writing 4GL Statements : Flow-Control Statements : Using the Endloop Statement
 
Share this page                  
Using the Endloop Statement
Use the endloop statement to break out of various kinds of loops. You can use endloop to terminate processing that starts with a while statement or to break out of an unloadtable loop without completing the processing of every row in the data set. You can also use it to exit from a submenu and return to an application, as in this example:
'End' = 
begin 
  endloop; 
end
You can also use the resume statement to break out of a loop and return the cursor to a specific position in the window.