1
0

Some formatting fixes

This commit is contained in:
Timothy Warren 2021-10-08 13:28:36 -04:00
parent a8c63d1f5a
commit 00f3dfe30c
2 changed files with 14 additions and 14 deletions

View File

@ -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)

View File

@ -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.