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; uses Dialogs;
type type
TPerson = class TPerson = class
procedure Speak; virtual; abstract; procedure Speak; virtual; abstract;
end; end;
{TBeckham} {TBeckham}
TBeckham = class(TPerson) TBeckham = class(TPerson)

View File

@ -10,7 +10,7 @@ uses
type type
{ TMainform } { TMainform }
TMainform = class(TForm) TMainform = class(TForm)
rgPeople: TRadioGroup; rgPeople: TRadioGroup;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure rgPeopleClick(Sender: TObject); procedure rgPeopleClick(Sender: TObject);
@ -33,18 +33,18 @@ end;
procedure TMainform.rgPeopleClick(Sender: TObject); procedure TMainform.rgPeopleClick(Sender: TObject);
var p: TPerson; var p: TPerson;
begin begin
if rgPeople.ItemIndex < 0 then Exit; if rgPeople.ItemIndex < 0 then Exit;
// Select the appropriate Person // Select the appropriate Person
case rgPeople.ItemIndex of case rgPeople.ItemIndex of
0: p := TBeckham.Create; 0: p := TBeckham.Create;
1: p := TShakespeare.Create; 1: p := TShakespeare.Create;
2: p := TWest.Create; 2: p := TWest.Create;
3: p := TBlaise.Create; 3: p := TBlaise.Create;
end; end;
p.Speak; p.Speak;
p.Free; p.Free;
end; end;
end. end.