home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2002 September / PCPlus_193_Laplink2000.iso / Prog / delphi / test / t1.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2002-04-29  |  793 b   |  50 lines

  1. unit t1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7.   Dialogs, StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Edit1: TEdit;
  12.     Button1: TButton;
  13.     Button2: TButton;
  14.     procedure Button1Click(Sender: TObject);
  15.     procedure Button2Click(Sender: TObject);
  16.   private
  17.     { Private declarations }
  18.   public
  19.     { Public declarations }
  20.   end;
  21.  
  22. var
  23.   Form1: TForm1;
  24.  
  25. implementation
  26.  
  27. {$R *.dfm}
  28.  
  29. procedure TForm1.Button1Click(Sender: TObject);
  30. var
  31.    X, Y, Z : string;
  32. begin
  33.    X := '1';
  34.    Y := '2';
  35.    Z := X + Y;
  36.    Edit1.Text := Z;
  37. end;
  38.  
  39. procedure TForm1.Button2Click(Sender: TObject);
  40. var
  41.    X, Y, Z : integer;
  42. begin
  43.    X := 1;
  44.    Y := 2;
  45.    Z := X + Y;
  46.    Edit1.Text := IntToStr(Z);
  47. end;
  48.  
  49. end.
  50.