From: kst@thomsoft.com (Keith Thompson)
Subject: Re: Protected Types and Address Clauses
Date: 1996/02/21
Date: 1996-02-21T00:00:00+00:00 [thread overview]
Message-ID: <Dn44po.8ys@thomsoft.com> (raw)
In-Reply-To: 4gcppr$10f5@watnews1.watson.ibm.com
In <4gcppr$10f5@watnews1.watson.ibm.com> ncohen@watson.ibm.com (Norman H. Cohen) writes:
> In article <4fqe6h$t0e@theopolis.orl.mmc.com>
> rgilbert@unconfigured.xvnews.domain (Bob Gilbert) wrote:
> BG> protected Discretes is
> BG> procedure Write(Settings : in SETTING_LIST);
> BG> private
> BG> HW_Control : DISCRETE_HW_CONTROL;
> BG> for HW_Control use at 16#4000_0001#;
> BG> end Discretes;
[...]
> This just establishes that the syntax allows representation clauses in
> the private part of a protected definition. I agree with Robert's
> conclusion that the RM appears (despite the intent of its authors) to
> permit this address clause, but as the result of a more intricate
> exegesis. By J.7(2),
>
> for HW_Control use at 16#4000_0001#;
>
> is equivalent to
>
> for HW_Control'Address use 16#4000_0001#;
>
> 13.3(10) says that this attribute is defined if HW_Control denotes an
> object, program unit, or label. In fact, HW_Control does denote an
> object, because 3.3(12) states that a component of an object is an
> object.
[...]
Yes, the 'Address attribute is defined for HW_Control; in fact you can
refer to HW_Control'Address from within the body of Discretes.Write.
That doesn't mean an address *clause* for HW_Control is legal.
RM95-13.3(12) says that
Address may be specified for stand-alone objects and for program
units via an attribute_definition_clause.
Since HW_Control is not a stand-alone object, an address clause for it
is not legal, any more than an address clause is legal for a label or
an array element.
(Incidentally, RM95-13.7(37) that System.Address should be private;
for implementations that follow this advice, 16#4000_0001# is not a
legal address.)
--
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
next prev parent reply other threads:[~1996-02-21 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 ` Keith Thompson [this message]
1996-02-21 0:00 ` Robert Dewar
1996-02-22 0:00 ` Keith Thompson
1996-02-22 0:00 ` Mark A Biggar
1996-02-23 0:00 ` Robert A Duff
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