
21.11.2010, 15:44
|
Новичок
|
|
Регистрация: 06.10.2010
Сообщения: 51
Репутация: 10
|
|
Код:
unit slojenie;
interface
procedure slojenie(a,b:Byte; var c:integer);
implementation
procedure slojenie(a,b:Byte; var c:integer);
begin
c:=a+b;
end;
end.
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,slojenie, StdCtrls;
type
TForm1 = class(TForm)
btn1: TButton;
lbl1: TLabel;
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
Var t,m,k:Byte;
begin
t:=1;
m:=1;
slojenie(t,m,k);
lbl1.caption:=inttostr(k);
end;
end.
|