鱼C论坛

 找回密码
 立即注册
查看: 3240|回复: 1

Delphi过程声明错误

[复制链接]
发表于 2013-6-7 14:29:39 | 显示全部楼层 |阅读模式
5鱼币
  1. unit Unit1;
  2. interface
  3. uses
  4. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5. Dialogs, StdCtrls;
  6. type
  7. TForm1 = class(TForm)
  8. Button1: TButton;
  9. procedure a(str: String); //过程
  10. private
  11. { Private declarations }
  12. public
  13. { Public declarations }
  14. end;
  15. var
  16. Form1: TForm1;
  17. implementation
  18. {$R *.dfm}
  19. end.

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

  23. end;
  24. end.
复制代码

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

最佳答案

查看完整内容

19行的 end. 去掉 :D
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2013-6-7 14:29:40 | 显示全部楼层
19行的 end. 去掉 :D
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-7 01:28

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表