陈贱伟 发表于 2013-6-7 14:29:39

Delphi过程声明错误

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure a(str: String); //过程
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.

//过程
procedure TForm1.a(str:string);
begin

end;
end.
错误提示
Unit1.pas(22): Text after final 'END.' - ignored by compiler
Unit1.pas(9): Unsatisfied forward or external declaration: 'TForm1.a'
Project1.dpr(5): Could not compile used unit 'Unit1.pas'

小布袋 发表于 2013-6-7 14:29:40

19行的 end. 去掉 :D
页: [1]
查看完整版本: Delphi过程声明错误