home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!usc!cs.utexas.edu!convex!constellation!osuunx.ucc.okstate.edu!vms.ocom.okstate.edu!adams
- From: adams@vms.ocom.okstate.edu
- Subject: Re: INHERITED: what are the advantages
- Message-ID: <1993Jan11.124620.1@vms.ocom.okstate.edu>
- Lines: 37
- Sender: news@osuunx.ucc.okstate.edu (USENET News System)
- Nntp-Posting-Host: vms.ocom.okstate.edu
- Organization: OSU College of Osteopathic Medicine
- References: <29505@oasys.dt.navy.mil>
- Date: Mon, 11 Jan 1993 18:46:20 GMT
-
- In article <29505@oasys.dt.navy.mil>, roth@oasys.dt.navy.mil (Pete Roth) writes:
- > There's not much in the BP7 docs about using the reserved word
- > INHERITED, although it is used in place of all previously fully
- > qualified method invocations. For example, in place of
- >
- > CONSTRUCTOR TDerived.Init ;
- > BEGIN
- > TBase.Init
- > ...
- >
- > the new "example" is
- >
- > CONSTRUCTOR TDerived.Init ;
- > BEGIN
- > INHERITED Init
- > ...
- >
- > How is this new model an advantage?
-
- In the development of an object, it is possible to change the base class
- (parent class, whatever you learned to call it) to something else. I myself
- have done this (creating a TIcon object, whose original base class was TButton,
- now it is TView -- using TP6.0 TVision). The use of INHERITED makes the code
- more readable as well.
-
- BTW, I wish this feature was available in TP6.0. Now I'll have to go out and
- buy BP7.0 (-:
-
- > - - - - - - - - - - - - - - - - - - - - - - - - - -
- > Grace & peace
- > Pete roth@oasys.dt.navy.mil
- > "Easy for me, difficult for you." - Senor Wences.
-
- Steven Adams (INTERNET: adams@vms.ocom.okstate.edu)
- Oklahoma State University
- College Of Osteopathic Medicine
- Tulsa, OK 74107
-