peter
hace 23 años
|
@@ -0,0 +1,16 @@
|
|
|
|
+{ %version=1.1 }
|
|
|
|
+{ %recompile }
|
|
|
|
+
|
|
|
|
+uses ub0421a;
|
|
|
|
+
|
|
|
|
+var
|
|
|
|
+ c : cl3;
|
|
|
|
+begin
|
|
|
|
+ c:=cl3.create;
|
|
|
|
+ writeln(c.f);
|
|
|
|
+ if (c.f<>10) then
|
|
|
|
+ begin
|
|
|
|
+ writeln('Error!');
|
|
|
|
+ halt(1);
|
|
|
|
+ end;
|
|
|
|
+end.
|
|
@@ -0,0 +1,14 @@
|
|
|
|
+unit ub0421a;
|
|
|
|
+interface
|
|
|
|
+{$mode objfpc}
|
|
|
|
+
|
|
|
|
+ uses ub0421b;
|
|
|
|
+
|
|
|
|
+type
|
|
|
|
+ cl3=class(cl2)
|
|
|
|
+ property f:longint read f1;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ implementation
|
|
|
|
+ end.
|
|
|
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
|
+unit ub0421b ;
|
|
|
|
+interface
|
|
|
|
+{$mode objfpc}
|
|
|
|
+
|
|
|
|
+ uses ub0421c;
|
|
|
|
+type
|
|
|
|
+ cl2=class(cl1)
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ implementation
|
|
|
|
+ end.
|
|
|
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
|
+unit ub0421c;
|
|
|
|
+interface
|
|
|
|
+
|
|
|
|
+{$mode objfpc}
|
|
|
|
+
|
|
|
|
+type
|
|
|
|
+ cl1=class
|
|
|
|
+ f1:longint;
|
|
|
|
+ constructor create;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+implementation
|
|
|
|
+
|
|
|
|
+ constructor cl1.create;
|
|
|
|
+ begin
|
|
|
|
+ f1 := 10;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+end.
|
|
|
|
+
|