From: matthias_k <nospam@digitalraid.com>
Subject: Classwide Parameter?
Date: Mon, 11 Oct 2004 18:01:41 +0200
Date: 2004-10-11T18:01:41+02:00 [thread overview]
Message-ID: <ckeaod$9hh$03$1@news.t-online.com> (raw)
Hiya,
I have experimented a little, and I can't really figure out what I need
classwide parameters for. Consider this code:
package Shape_Pkg is
type Shape is abstract tagged null record;
procedure Draw (obj: Shape);
end;
package Circle_Pkg is
type Circle is new Shape with null record;
procedure Draw (obj: Circle);
end;
...
procedure Test is
c: Circle;
begin
Draw( c ); -- calls Circle_Pkg.Draw
end Test;
------------
Now, if I change Shape_Pkg.Draw's formal parameter to Shape'Class,
what's the difference? In both cases it's legal to call Draw on a Circle.
- Matthias
next reply other threads:[~2004-10-11 16:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-11 16:01 matthias_k [this message]
2004-10-11 16:53 ` Classwide Parameter? Matthew Heaney
2004-10-11 17:08 ` matthias_k
2004-10-11 19:16 ` Simon Wright
2004-10-11 22:53 ` Brian May
2004-10-12 2:29 ` Matthew Heaney
2004-10-12 8:01 ` matthias_k
2004-10-12 8:53 ` Martin Krischik
2004-10-12 13:10 ` Matthew Heaney
2004-10-12 7:59 ` Dmitry A. Kazakov
[not found] ` <ckg3h6$qau$03$1@news.t-online.com>
2004-10-12 8:14 ` matthias_k
2004-10-12 15:13 ` Dmitry A. Kazakov
2004-10-12 8:10 ` Martin Krischik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox