| Description |
The End keyword is fundamental to Delphi - it terminates statement blocks.
The most common is :
Begin
??... statements ...
End;
|
|
| Related commands |
| Begin |
|
Keyword that starts a statement block |
| Case |
|
A mechanism for acting upon different values of an Ordinal |
| Program |
|
Defines the start of an application |
| Try |
|
Starts code that has error trapping |
| Type |
|
Defines a new category of variable or process |
| Unit |
|
Defines the start of a unit file - a Delphi module |
|
|
|
| Example code : Some examples of the end clause |
// Full Unit code. // ----------------------------------------------------------- // You must store this code in a unit called Unit1 with a form // called Form1 that has an OnCreate event called FormCreate. unit Unit1; interface uses Forms, Dialogs; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} // Include form definitions procedure TForm1.FormCreate(Sender: TObject); var
i : Integer;
begin
i := 2;
case i of
0 : Showmessage('i = 0');
1 : Showmessage('i = 1');
2 : Showmessage('i = 2');
End;
End; end.
|
| Hide full unit code |
i = 2
|
|