The difference introduction of exit,abort,break,continue in Delphi _delphi

Source: Internet
Author: User
Tags error code
The Delphi says jumps out has break,continue, Exit,abort, Halt, Runerror.
1. Break forces an exit loop (which can only be placed in a loop) to force an exit from a for statement, a while statement, or a repeat statement.
2. Continue is used to forcibly end this call loop from the For statement, while statement, or repeat statement, and start the next loop.
3, exit is used to exit from the current block of code. If the code is the main program, terminate the program, or the procedure or function immediately if it is a function or procedure.
4, Abort abort the operation of the program, resulting in the exception information without error. Jump out of the ancestor module. And exit is the difference between
Copy Code code as follows:

Procedure P1;
Begin
P2;
P3;
End

procedure P2;
Begin
Abort Exit
End

Procedure P3;
Begin
ShowMessage ().
End

If you use Abort, you cannot execute P3, and if you use Exit, you can perform to P3.
5, halt used to forcibly terminate the execution of the application, return to the operating system (abnormal exit mode).
6, Runerror terminate the execution of the program, and generate a run error (return error code).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.