
27.05.2007, 15:35
|
|
Banned
Регистрация: 28.04.2007
Сообщений: 20
Провел на форуме: 301133
Репутация:
-44
|
|
хочу сделать типа калькулятора ток на сложение вот код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
CalculateButton: TButton;
EndEdit: TEdit;
Label1: TLabel;
ResultEdit: TEdit;
Label2: TLabel;
Edit1: TEdit;
Label3: TLabel;
procedure CalculateButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.CalculateButtonClick(Sender: TObject);
var
a:Integer;
b:Integer;
sum:Integer;
EndCount:Integer;
begin
if (a=0) and (b=0 ) and (sum=0) then EndCount
Sum:=a+b;
ResultEdit.Text:=IntToStr(Sum);
end;
end.
|
|
|