comp.lang.ada
 help / color / mirror / Atom feed
From: marciant@earthlink.net
Subject: Re: Overriding puzzle
Date: Wed, 30 Dec 2015 10:07:28 -0800 (PST)
Date: 2015-12-30T10:07:28-08:00	[thread overview]
Message-ID: <c63a98f4-1127-4e7d-852f-ad418a4a749f@googlegroups.com> (raw)
In-Reply-To: <192c4493-9c53-4e23-b9bd-e4c543738dbc@googlegroups.com>

On Wednesday, December 30, 2015 at 10:10:16 AM UTC-5, Egil H H wrote:
> You need to make the call to Header dispatching.
> One way would be:
> 
>    procedure New_Page(o: A) is 
>     begin 
>       Header(A'Class(o)); 
>     end;
> 
> -- 
> ~egilhh

I do not think that that is it. I think that type custom should be declared in a package like A is.  Even though the New_Page procedure for Custom is overriding the inherited one, it is not a "primitive" operation associated with the type unless it it within the same _package_ as the type.  The Custom type and the overriding procedure are not in a package, they are in a procedure!


  parent reply	other threads:[~2015-12-30 18:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30 14:49 Overriding puzzle gautier_niouzes
2015-12-30 15:10 ` Egil H H
2015-12-30 17:31   ` gautier_niouzes
2015-12-30 18:07   ` marciant [this message]
2015-12-30 18:24     ` gautier_niouzes
2015-12-30 21:40       ` marciant
2015-12-30 23:10         ` Randy Brukardt
2015-12-31  8:22           ` Niklas Holsti
2015-12-31  8:42             ` Dmitry A. Kazakov
2016-01-03  7:18             ` Randy Brukardt
2015-12-31 16:30           ` marciant
2015-12-30 23:13     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox