comp.lang.ada
 help / color / mirror / Atom feed
From: kst@thomsoft.com (Keith Thompson)
Subject: Re: Protected Types and Address Clauses
Date: 1996/02/22
Date: 1996-02-22T00:00:00+00:00	[thread overview]
Message-ID: <Dn5Mq1.Ewz@thomsoft.com> (raw)
In-Reply-To: dewar.824905563@schonberg

In <dewar.824905563@schonberg> dewar@cs.nyu.edu (Robert Dewar) writes:
[...]
> If you declare a single protected object, it is fine to have an address
> clause for the object, but not for its individual components.

Such an address clause is unlikely to do you much good, though, unless
you know exactly how the implementation lays out the components of a
protected object.  I presume that many implementations will put the
implementation-defined implicit components common to all protected
types at the beginning of the object (for more efficient addressing),
so user-declared components are likely to be at a substantial offset.

If you need to have an object of a particular type at a specified
address with the kind of protection offered by protected types, you'll
probably need to use Tucker Taft's suggested work-around of moving the
data declarations into the package body surrounding the protected body.

-- 
Keith Thompson (The_Other_Keith) kst@thomsoft.com
TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718
"As God is my witness, I thought turkeys could fly." -- Arthur Carlson, WKRP




  reply	other threads:[~1996-02-22  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4fqe6h$t0e@theopolis.orl.mmc.com>
1996-02-19  0:00 ` Protected Types and Address Clauses Robert I. Eachus
1996-02-20  0:00   ` Norman H. Cohen
1996-02-21  0:00     ` Robert Dewar
1996-02-22  0:00       ` Keith Thompson [this message]
1996-02-22  0:00         ` Mark A Biggar
1996-02-23  0:00           ` Robert A Duff
1996-02-21  0:00     ` Keith Thompson
1996-02-21  0:00   ` Robert I. Eachus
     [not found] <DMrJAC.788@thomsoft.com>
1996-02-21  0:00 ` Bob Gilbert
replies disabled

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