home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1989
/
20
/
construc.pas
next >
Wrap
Pascal/Delphi Source File
|
1989-10-18
|
659b
|
43 lines
CONSTRUC.PAS
PROGRAM construc;
TYPE
Parent = OBJECT
CONSTRUCTOR Init;
PROCEDURE InitializeParent;
PROCEDURE Message; Virtual;
END;
Child = OBJECT(Parent)
CONSTRUCTOR Init;
PROCEDURE Message; Virtual;
END;
CONSTRUCTOR Parent.Init;
BEGIN END;
PROCEDURE Parent.InitializeParent;
BEGIN
Init; {- Calls Parent.Init -}
END;
PROCEDURE Parent.Message;
BEGIN WriteLn('Parent Message'); END;
CONSTRUCTOR Child.Init;
BEGIN InitializeParent; END;
PROCEDURE Child.Message;
BEGIN Writeln('Child Message'); END;
VAR
ChildInst: Child;
BEGIN
ChildInst.Init;
ChildInst.Message;
END.