Delphi indicates that there are break,continue,abort,exit,halt,runerror, etc.
1.break
Force the exit of the most recent loop (note: It can only be placed in a loop, and it can only jump out of the last layer of the loop ), and is used to force exit from the for, while, repeat statements
Functionality similar to break in languages such as C + +
2.continue
For this processing in the end loop from the for, while, repeat statement, continue execution from the beginning of the loop body
Features similar to continue in languages such as C + +
3.exit
Used to exit from the current code block.
If the code is the main program, terminate the program.
If it is a function or procedure, immediately terminates the function or procedure
4.abort
Termination of the program required to run, generating non-error exception information. Jump out of the ancestor module. And the difference between exit is
Procedure P1;begin p2; P3;end;procedure p2;begin abort; or exit;end;procedure p3;begin //perform some operation end;
In the execution of P1, if P2 inside with abort, then do not P3
If you use Exit, you can execute to P3, because exit can only control the function or procedure that terminates it, and cannot terminate the block of code that invokes its function. If you use Exit to terminate the function that it is in, it will jump back to the code block of the function and proceed with the execution of the code.
5.halt
Used to forcibly terminate the execution of an application, returning the operating system (non-normal exit mode)
6.runerror
Terminates execution of the program and produces a run error (return error code)
The difference between exit, break, continue and other actions in Delphi