comp.lang.ada
 help / color / mirror / Atom feed
From: nobody@REPLAY.COM (Anonymous)
Subject: Re: Q Controlled Types
Date: 1997/06/06
Date: 1997-06-06T00:00:00+00:00	[thread overview]
Message-ID: <199706061252.OAA22753@basement.replay.com> (raw)
In-Reply-To: 5n73uf$m1l@news.Informatik.Uni-Oldenburg.DE


On 5 Jun 1997 19:27:11 GMT, "Guido Schumacher"
<Guido.Schumacher@Informatik.Uni-Oldenburg.DE> wrote:

> Is there a possibility to distinguish two different kinds of situations
> in which Finalize can be called from within the body of Finalize?
> In other words, is it possible to treat the finalization of an object differently,
> depending on the context in which it is performed?

In a word, "No."

> 1. Calling of Finalize as part of an assignment operation
> 2. Finalize is called before the object is destroyed (and no copy is performed)
> 
> declare
>   V: CT; -- type CT is new controlled with ...
> begin 
>   ...
>   V := E;    -- (1)
>   ...
> end;         -- (2)
> 
> I would appreciate any help.

Now, I'm sure someone will post a response about GNAT-specific
information you can use to determine the context with GNAT, but withing
the confines of the language specification there is no way for Finalize
to know why it is being called.

Should someone prove me wrong, I'd be interested to learn how to do
this.

Jeff Carter  PGP:1024/440FBE21
My real e-mail address: ( carter @ innocon . com )
"Now go away, or I shall taunt you a second time."
Monty Python & the Holy Grail

Posted with Spam Hater - see
http://www.compulink.co.uk/~net-services/spam/




  reply	other threads:[~1997-06-06  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-05  0:00 Q Controlled Types Guido Schumacher
1997-06-06  0:00 ` Anonymous [this message]
1997-06-07  0:00   ` Robert A Duff
1997-06-06  0:00 ` Mark A Biggar
  -- strict thread matches above, loose matches on Subject: below --
1997-06-13  0:00 Guido Schumacher
1997-06-14  0:00 ` Robert A Duff
replies disabled

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