using interface lazarus / 21-General ---------------------------------------------------------------------- Dzandaa · 2021-10-15 09:54 Hi everybody, Working with Pascal Lazarus 2.0.12 on Windows Mac and Linux. I try to translate one of my C# program to Pascal and I'm stuck with interfaces... My C# code: Code: C  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    public interface INeuronSignal    {        double Output { get; set; }    }     public interface INeuronReceptor    {        Dictionary Input { get; }    }     public interface INeuron : INeuronSignal, INeuronReceptor    {       // Etc...    }  My Pascal Code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i typeINeuronSignal = interface  function GetOutput:Double;  procedure SetOutput(AX:Double);  property Output:Double read GetOutput write SetOutput; typeINeuronReceptor = interface  function GetInput: specialize TDictionary;  property Input: specialize TDictionary read GetInput;end; typeINeuron = interface(INeuronSignal, INeuronReceptor) // <--- Error Interface cannot depend of 2 other Interfaces?end;   Any Idea, or it is not possible in Lazarus Pascal? Thank you. ---------------------------------------------------------------------- Zvoni · 2021-10-15 10:25 AFAIK, no multiple Interface inheritance in FreePascal. 2 possible Methods come to mind: 1) "Chain" them INeuronReceptor inherits from INeuronSignal INeuron inherits from INeuronReceptor 2) Don't bother. A Class can inherit multiple interfaces. Type MyClass = Class(TInterfacedObject, IInterface1, IInterface2 .... ) ---------------------------------------------------------------------- Dzandaa · 2021-10-15 13:30 Thank you, It seems to work, but now I'm stuck with that part: Code: C  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     public interface INeuralLayer : IList    {     // Etc...    }  I read that there is an IInterfaceList, but I don't know how to use it... I think I'll stop to convert my program, because the lack of documentation and examples. Thank you anyway. ---------------------------------------------------------------------- PascalDragon · 2021-10-15 13:40 There simply is no (standardized) interface for lists like there is in .Net, you'd have to roll your own or provide the necessary methods manually in your INeuralLayer.