i have two units, first one, my interface:
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;
second unit, my object declaration:
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;
I get a error message only in 'proceso' function and 'iniciar' procedure:
declaration of 'Iniciar' differs from previous declaration
declaration of 'Proceso' differs from previous declaration.
I noticed that they've array parameter. The parameter's type are defined in the first unit, if i define these types in the second units i get the same error but it's showed in the declaration of the object. how can i compile?
uses
, notuse
– Frenchmanunit
– Coed