comp.lang.ada
 help / color / mirror / Atom feed
From: stt@blackstone.camb.inmet.com (Tucker Taft)
Subject: Re: Q. on Automatic Package Finalization
Date: 1996/09/24
Date: 1996-09-24T00:00:00+00:00	[thread overview]
Message-ID: <Dy993o.A9o.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 324837B8.2361@watson.ibm.com


Norman H. Cohen (ncohen@watson.ibm.com) wrote:

: ...
: David Gibson's problem was frame finalization not for a procedure, but
: for a generic package.  He ran into a similar restriction, against
: extending a library-level type in a generic body (RM 3.9.1(4)).  His
: solution is to declare his controlled type at library level.  Instead of
: declaring a dummy controlled type with no components, he gives the type
: one record component for each of the local variables that the
: finalization routine is to manipulate.  The finalization routine is
: rewritten to manipulate the corresponding components of the object being
: passed to it.  The local variables to be finalized are replaced by a
: single object of the new controlled type.   ...

Another approach would be to use access discriminants rather
than components.  The local variables of interest would need to
be aliased, so they could be referenced by the access discriminants
of the controlled object.

: ...
: Norman H. Cohen
: mailto:ncohen@watson.ibm.com
: http://www.research.ibm.com/people/n/ncohen

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




  reply	other threads:[~1996-09-24  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-22  0:00 Q. on Automatic Package Finalization david scott gibson
1996-09-23  0:00 ` Robert Dewar
1996-09-24  0:00   ` Norman H. Cohen
1996-09-24  0:00     ` Tucker Taft [this message]
1996-09-25  0:00   ` Jens Jakob Jensen
1996-09-25  0:00   ` Norman H. Cohen
  -- strict thread matches above, loose matches on Subject: below --
1996-09-28  0:00 Robert Dewar
1996-10-04  0:00 ` Norman H. Cohen
1996-10-04  0:00   ` Robert Dewar
1996-09-28  0:00 Robert Dewar
1996-10-04  0:00 ` Norman H. Cohen
1996-10-06  0:00   ` Robert Dewar
replies disabled

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