unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Keller, StdCtrls;
type
TForm1 =
class(TForm)
Label1: TLabel;
Button1: TButton;
Button3: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Keller: TKeller;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Keller:=TKeller.create
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Keller.push('
m');
Label1.Caption:=Keller.top;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Keller.push('
X');
Label1.Caption:=Keller.top;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Keller.pop;
Label1.Caption:=Keller.top;
end;
end.