1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

Exit

unit
System
category
flow control routines

declaration
procedure Exit;

description
Exits the method in which it appears.

If the current procedure is the main program, Exit causes the program to terminate - like a call to Application.Terminate If Exit is called inside the try clause, the finally clause is still executed.

example
//alow only numeric characters in an Edit box

procedure TForm1.Edit1KeyPress
(Sender: TObject; var Key: Char);
begin
 if not (key in ['0'..'9']) then Exit;
end;

in real code

see also
Continue, Abort,


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?
Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.