<< back to sysax.com Product page

1.10. Forced exit from loops

The exitloop command can be used to immediately exit from a loop. If this command is called from nested loops, the innermost loop is exited.

Exhibit 1.14. Syntax of command for exit from loops

exitloop;

Exhibit 1.15. Example for using the command for exit from loops

loop 100 begin

  ftpconnect "ftp.ftpsite.com", 21, "ftp", "ftp@site.com";

  if success eq ftpresult begin
    exitloop;  #exit loop immediately if connected
  end

end