From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8047848c4805a99e,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: matthias_k Newsgroups: comp.lang.ada Subject: Classwide Parameter? Date: Mon, 11 Oct 2004 18:01:41 +0200 Organization: T-Online Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 1097510478 03 9777 9L-oXzP63SDpJrA 041011 16:01:18 X-Complaints-To: usenet-abuse@t-online.de X-ID: GWaQx+ZAreB5WDVlL4CqMX0+Izmtv5WOZ6Hdz1Rwn3lhQc3Vd8GcQO User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: en-us, en Xref: g2news1.google.com comp.lang.ada:5046 Date: 2004-10-11T18:01:41+02:00 List-Id: 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