Hola,
Problablemente te serviría convertir la función en un método de la clase "TFrm_p1":
Código Delphi
[-]
type
TFrm_p1 = class(TForm)
private
function Insertar(numero: string) : integer;
end;
implementation
function TFrm_p1.Insertar(numero: string) : integer;
begin
if (usado= 0) then
begin
Edt_1.Text:= '';
usado:= 1;
end;
Edt_1.text:= Edt_1.text + numero;
end;