type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject); private
{ Private declarations }
public
{ Public declarations }
function dd:String;
end;var
Form1: TForm1;implementation
uses unit2;
{$R *.dfm}
//var cc:String;
function dd:String;
begin
result:='iloveyou';
end;
。。
编译时,提示
[Error] Unit1.pas(19): Unsatisfied forward or external declaration: 'TForm1.dd'
为什么?
^^^^^^^
begin
result:='iloveyou';
end;