我有两个单元,第一个,我的界面:
use personas
interface
type
Tllave = array[0..31] of byte;
Tdatos = array of byte;
ImyInterface = interface(IInterface)
function nombre : string;
function edad : integer;
procedure resetear;
function Proceso(datos : tdatos; cantidad : integer) : integer ;
procedure Iniciar(llave : Tllave);
end;
第二单元,我的对象声明:
use militares
interface
uses personas;
type
Tmilitares = Class(TInterfacedObject, ImyInterface )
public
function nombre : string;
function edad : integer;
procedure resetear;
function Proceso(datos : Tdatos; cantidad : integer) : integer ;
procedure Iniciar(llave : Tllave);
published
constructor create;
end;
implementation
function tmilitares.Proceso(datos : tdatos; cantidad : integer) : integer ; // getting error !!
begin
// ....
end;
procedure tmilitares.Iniciar(llave : Tllave); // getting error!!
begin
// ....
end;
我仅在“proceso”功能和“iniciar”程序中收到错误消息:
'Iniciar' 的声明不同于之前
的'Proceso' 的声明与之前的声明不同。
我注意到他们有数组参数。参数的类型在第一个单元中定义,如果我在第二个单元中定义这些类型,我会得到相同的错误,但它显示在对象的声明中。我该如何编译?