comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@alexandria (Jon S Anthony)
Subject: Re: Extending A Generic Signature Package
Date: 1997/03/21
Date: 1997-03-21T00:00:00+00:00	[thread overview]
Message-ID: <JSA.97Mar21135016@alexandria> (raw)
In-Reply-To: 5gkv23INN3rn@thalamus.cis.ohio-state.edu


In article <5gtvbv$1nj@pandora.cs.utwente.nl> boschg@cs.utwente.nl (Geert Bosch) writes:

> Dispatching occurs when you use (pointers to) class-wide types like
> in the following case:
> 
>    declare
>        type Object_Ptr is access all Base'Class;
>       X : Object_Ptr := new Base;
>    begin
>       Op1 (X.all);
>    end;

Just to be clear, "pointers" are only indirectly relevant to
dispatching.  The key is passing a class wide type argument(s) to a
controlling operand(s) of a primitive operation.  For example, there
is no need of a pointer in your above example:

    declare
       X : Base'Class := Get_Object;
    begin
       Op1(X);
    end;

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





  parent reply	other threads:[~1997-03-21  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-17  0:00 Extending A Generic Signature Package david scott gibson
1997-03-18  0:00 ` Tucker Taft
1997-03-18  0:00   ` Alexander V. Konstantinou
1997-03-21  0:00     ` Geert Bosch
1997-03-21  0:00       ` Brian Rogoff
1997-03-22  0:00         ` Robert A Duff
1997-03-21  0:00 ` Jon S Anthony [this message]
1997-03-21  0:00   ` david scott gibson
1997-03-22  0:00     ` Robert A Duff
1997-03-22  0:00 ` Jon S Anthony
1997-03-21  0:00   ` david scott gibson
1997-03-22  0:00     ` Robert A Duff
1997-03-25  0:00 ` Jon S Anthony
replies disabled

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