Показать сообщение отдельно

  #7  
Старый 02.08.2008, 23:51
diznt
Постоянный
Регистрация: 31.01.2008
Сообщений: 643
Провел на форуме:
6128108

Репутация: 445


По умолчанию

Код:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    txtA: TEdit;
    txtB: TEdit;
    txtD: TEdit;
    txtC: TEdit;
    butAction: TButton;
    ButClose: TButton;
    procedure butActionClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.butActionClick(Sender: TObject);
var
 a,b,c,d    : integer;
begin
 a:=StrToInt(txtA.Text);
 b:=StrToInt(txtB.Text);

  if d='+' then
   begin
    c:=a-b;
   end;

  if d='-' then
   begin
    c:b-a;
   end;

 txtC.Text:=IntToStr(c);

end;

end.
Пишет ошибки......

 
Ответить с цитированием