Article View: comp.lang.eiffel
Article #1264Re: generic parameters
From: Lee Sailer
Date: Tue, 20 Dec 1988 20:36
Date: Tue, 20 Dec 1988 20:36
25 lines
1180 bytes
1180 bytes
In article <1826@vlot.cs.vu.nl>, jos@cs.vu.nl says:
>
>In Bertrand Meyer's book there is an example about a hierarchic
>window class. On page 284 the example looks like:
>
> class WINDOW export ..... inherit
> TREE
> rename
> child as subwindow,
> parent as superwindow,
> insert_child as insert_subwindow, etc.
> ...
>
>WINDOW inherits class TREE, but it does not specify the generic
>parameter of TREE.
>
I dunno Eiffel, but this looks enough like Simula that I'll give you
the Simula answer 8-)
In your example, the WINDOW class *does* inherit all of the
attributes of TREE, including T. When you create a new instance of
WINDOW you must specify T, as in
newW :- NEW WINDOW[T, other formal parameters of WINDOW].
Technical Details
Message-ID:
<65745UH2@PSUVM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!nrl-cmf!ukma!psuvm.bitnet!uh2References:
<1826@vlot.cs.vu.nl>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!nrl-cmf!ukma!psuvm.bitnet!uh2 From: UH2@PSUVM.BITNET (Lee Sailer) Newsgroups: comp.lang.eiffel Subject: Re: generic parameters Message-ID: <65745UH2@PSUVM> Date: 20 Dec 88 20:36:49 GMT References: <1826@vlot.cs.vu.nl> Organization: Penn State Erie, Behrend College Lines: 23