[fpc-pascal] Inherit interface from 2 interfaces

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Fri Apr 8 11:16:12 CEST 2011



On Fri, 8 Apr 2011, Zaher Dirkey wrote:

> 2011/4/7 Flávio Etrusco <flavio.etrusco at gmail.com>
>
>> On Wed, Apr 6, 2011 at 1:37 PM, Zaher Dirkey <parmaja at gmail.com> wrote:
>>> Can i do that?
>>> type
>>>   IIntf3 = interface(IIntf11, IIntf2)
>>> ....
>>>   end;
>>>
>>> Thanks in advance.
>>> --
>>> Zaher Dirkey
>>>
>>
>> For Corba interfaces, yes. Not for COM interfaces.
>> http://www.freepascal.org/docs-html/ref/refse39.html
>>
>>
> I added {$INTERFACES CORBA} but same error ~Fatal: Syntax error, ")"
> expected but "," found~ in the line ~IIntf3 = interface(IIntf11, IIntf2)~

The whole idea of interfaces is to avoid multiple inheritance.

So you can never inherit from more than one interface.

Also not in CORBA interfaces. The mentioned page of the manual nowhere
states that this is possible. It just says that for CORBA interfaces,
the interface does not descend from IUnknown.

Michael.


More information about the fpc-pascal mailing list