像下面这样写一定没问题
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure add(s:integer);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.add(s:integer);//你这里肯定没写对,是不是少了TForm1?
begin
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
add(676);
end;