Надо два разных модуля: Unit exerc_f
uses
...
implementation
procedure btn_execute.Click
begin
if not (TryStrToInt(edt_1.Text)) and (TryStrToInt(edt_2.Text)) then
ShowMessage('Введите числа!')
else
if check.true then
exerc_c.execute(edt_1.Text,edt_2.Text)
lbl_1.Caption:=execute.x
lbl_2.Caption:=execute.y
else
lbl_1.Caption:=edt_1.Text
lbl_2.Cap tion:=edt_2.Text
end;
Unit exerc_c
uses
...
implementation
function check:boolean;
var
_x,_y:integer
begin
if (_x>=0) and (_y>=0) then
check:=true
else
check:=false;
end;
procedure execute(x,y:integer)
begin
if (x<0.5) and (x>2) and (y<0.5) and (y>2) then
x:=x/10
y:=y/10
else
x:=x
y:=y
end;
Вроде так, хотя скорее всего где-нибудь ошибся
P.S. Delphi — результат развития языка Турбо Паскаль, который, в свою очередь, развился из языка Паскаль. (с) Википедия