Some formatting fixes
This commit is contained in:
parent
a8c63d1f5a
commit
00f3dfe30c
@ -7,9 +7,9 @@ interface
|
||||
uses Dialogs;
|
||||
|
||||
type
|
||||
TPerson = class
|
||||
procedure Speak; virtual; abstract;
|
||||
end;
|
||||
TPerson = class
|
||||
procedure Speak; virtual; abstract;
|
||||
end;
|
||||
|
||||
{TBeckham}
|
||||
TBeckham = class(TPerson)
|
||||
|
@ -10,7 +10,7 @@ uses
|
||||
type
|
||||
|
||||
{ TMainform }
|
||||
TMainform = class(TForm)
|
||||
TMainform = class(TForm)
|
||||
rgPeople: TRadioGroup;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure rgPeopleClick(Sender: TObject);
|
||||
@ -33,18 +33,18 @@ end;
|
||||
procedure TMainform.rgPeopleClick(Sender: TObject);
|
||||
var p: TPerson;
|
||||
begin
|
||||
if rgPeople.ItemIndex < 0 then Exit;
|
||||
if rgPeople.ItemIndex < 0 then Exit;
|
||||
|
||||
// Select the appropriate Person
|
||||
case rgPeople.ItemIndex of
|
||||
0: p := TBeckham.Create;
|
||||
1: p := TShakespeare.Create;
|
||||
2: p := TWest.Create;
|
||||
3: p := TBlaise.Create;
|
||||
end;
|
||||
// Select the appropriate Person
|
||||
case rgPeople.ItemIndex of
|
||||
0: p := TBeckham.Create;
|
||||
1: p := TShakespeare.Create;
|
||||
2: p := TWest.Create;
|
||||
3: p := TBlaise.Create;
|
||||
end;
|
||||
|
||||
p.Speak;
|
||||
p.Free;
|
||||
p.Speak;
|
||||
p.Free;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user