AW: [lazarus] A hope.

Marc Weustink Marc.Weustink at cuperus.nl
Thu Dec 16 04:42:51 EST 1999


+ From: Thomas Singer [mailto:singer at dcs-systeme.de]
+ >> ...
+ >> what do you mean with interfaces? Interface and implementation in
+ >> pascal/delphi manner or interfaces in java-manner?
+ >
+ >Is there a difference? I think pascal/delphi interface are the same
+ >in Java, but Borland abuses them to support COM.
+ With Delphi interface I mean the following:
+ 
+ unit test;
+ 
+ interface { stuff that could be seen from out of unit test. }
+ 
+   function test01( a: integer ): integer;
+ 
+ implementation { this stuff is only visible within the unit test. }
+ 
+   function test01( a: integer ): integer;
+   begin
+     result := a + 1;
+   end;
+ 
+ end.
+ 
+ With Java interfaces I mean the possibility to define totally abstract
+ classes (only method headers, no implementation), that could 
+ be used for
+ multiple inheritence. A (real) Java-class could have only one 
+ superclass,
+ but none or more interfaces. Clear?

Like Delphi ??

type
  IMyInterface = interface
    procedure P1;
    procedure P2;
  end;

Marc






More information about the Lazarus mailing list