我尝试定义我拥有的私有方法:
unit FormENP;
interface
uses
....
type
TENPDataEntry = class(TForm)
........
private
{ Private declarations }
function getLastIdMuestra(): integer;
public
{ Public declarations }
end;
var
ENPDataEntry: TENPDataEntry;
implementation
{$R *.dfm}
{ Devuelve el id de la última muestra insertada en <MUESTRA> }
function getLastIdMuestra(): integer;
var
query: TIBQuery;
id: integer;
begin
query := TIBQuery.Create(nil);
....
id := query.Fields[0].AsInteger;
query.Destroy;
getLastIdMuestra := id;
end;
...
End.
但是编译器说:
[DCC 错误] FormENP.pas(30): E2065 Unsatisfied forward or external declaration: 'TENPDataEntry.getLastIdMuestra'
第 30 行是方法签名:
函数getLastIdMuestra():整数;
我是德尔福的新手,有什么想法吗?我认为代码很好...