home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
pcmag
/
vol8n20.arc
/
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.