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,856114749978634c X-Google-Attributes: gid103376,public From: kst@thomsoft.com (Keith Thompson) Subject: Re: Protected Types and Address Clauses Date: 1996/02/21 Message-ID: #1/1 X-Deja-AN: 140400022 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: pulsar references: <4fqe6h$t0e@theopolis.orl.mmc.com> <4gcppr$10f5@watnews1.watson.ibm.com> organization: Thomson Software Products, San Diego, CA, USA newsgroups: comp.lang.ada originator: kst@pulsar Date: 1996-02-21T00:00:00+00:00 List-Id: 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