In delphi, break, continue, exit, abort, halt, and runerror are displayed.
1. The break force exit loop (which can only be placed in the loop) is used to force exit from the For statement, while statement, or repeat statement.
2. continue is used to forcibly end the called loop from the For statement, while statement, or repeat statement and start the next loop.
3. exit is used to exit from the current code block. If the code is the main program, terminate the program. If it is a function or process, the process or function is immediately executed.
4. abort terminates the program and generates no error information. Jump out of the ancestor module. The difference between exit and exit is:
Copy codeThe Code is as follows: procedure p1;
Begin
P2;
P3;
End;
Procedure p2;
Begin
Abort; // exit;
End;
Procedure p3;
Begin
// Showmessage ()..
End;
If Abort is used, P3 cannot be executed. If Exit is used, P3 can be executed.
5. halt is used to forcibly terminate application execution and return to the Operating System (abnormal exit mode ).
6. runerror: Terminate the program execution and generate a running error (the error code is returned ).