From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Constructor in ADA9X
Date: Fri, 10 Feb 1995 13:49:12 GMT
Date: 1995-02-10T13:49:12+00:00 [thread overview]
Message-ID: <D3sEE1.70B@world.std.com> (raw)
In-Reply-To: RTOAL.13.0010EBFD@lmumail.lmu.edu
In article <RTOAL.13.0010EBFD@lmumail.lmu.edu>,
Ray Toal <RTOAL@lmumail.lmu.edu> wrote:
> type Rectangle is new Shape with private;
> function Make_Rectangle (R: in out Rectangle; Width, Height: Real)
> return Rectangle;
I don't understand why Make_Rectangle takes a Rectangle as a parameter,
and also returns one as a result. Don't you mean something like this
instead:
function Make_Rectangle (Width, Height: Real) return Rectangle;
If that's what you meant, then you could make it class-wide:
function Make_Rectangle (Width, Height: Real) return Rectangle'Class;
This function will not be inherited.
Alternatively, you can call all your constructors the same name (say,
"Make") -- then it won't do any harm that they get inherited.
- Bob
next prev parent reply other threads:[~1995-02-10 13:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-02-06 20:40 Constructor in ADA9X DELROEUX JEAN-YVES
1995-02-06 23:35 ` Tore Joergensen
1995-02-08 6:09 ` Kenneth Almquist
1995-02-08 16:55 ` Ray Toal
1995-02-10 13:49 ` Robert A Duff [this message]
1995-02-11 11:46 ` Stephane Barbey
1995-02-10 22:38 ` Michael Feldman
1995-02-08 14:42 ` Tucker Taft
1995-02-10 0:22 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox