读书人

为什么在自定义函数内不能使用系统函数

发布时间: 2012-02-27 10:00:22 作者: rapoo

为什么在自定义函数内不能使用系统函数
[错误] ftp1.pas(100): Undeclared identifier: 'get'
[错误] ftp1.pas(102): Undeclared identifier: 'SetFileDateTime'
[错误] ftp1.pas(111): Undeclared identifier: 'get'
[错误] ftp1.pas(117): Undeclared identifier: 'listbox'
[错误] ftp1.pas(117): Missing operator or semicolon
[错误] ftp1.pas(164): Unknown directive: 'hThread'
[错误] ftp1.pas(166): Undeclared identifier: 'hthread'
[错误] ftp1.pas(166): Undeclared identifier: 'upfile'
[错误] ftp1.pas(166): Undeclared identifier: 'ThreadID'
[致命错误] ftp10.dpr(5): Could not compile used unit 'ftp1.pas'

为什么在自定义函数内不能使用系统函数

[解决办法]
在自己定义的函数里可以调用系统函数的
你编译的错误不是这个导致的
而是下面的错误
致命错误] ftp10.dpr(5): Could not compile used unit 'ftp1.pas '
这个错误说明你上面的函数是这个 ftp1.pas单元里的
你用了这个单元的函数 但你没有uses它 所以才会报错的

读书人网 >.NET

热点推荐