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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,96ec22b0d62e8e73 X-Google-Attributes: gid103376,public From: nobody@REPLAY.COM (Anonymous) Subject: Re: Q Controlled Types Date: 1997/06/06 Message-ID: <199706061252.OAA22753@basement.replay.com>#1/1 X-Deja-AN: 246539005 References: <5n73uf$m1l@news.Informatik.Uni-Oldenburg.DE> Organization: Replay and Company UnLimited X-001: Replay may or may not approve of the content of this posting Mail-To-News-Contact: postmaster@nym.alias.net X-002: Report misuse of this automated service to X-URL: http://www.replay.com/remailer/ Newsgroups: comp.lang.ada Date: 1997-06-06T00:00:00+00:00 List-Id: On 5 Jun 1997 19:27:11 GMT, "Guido Schumacher" 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/