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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Predefined Language Attributes 'ADDRESS and 'ACCESS Date: Thu, 6 Dec 2018 17:43:37 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <5c08c0d3$0$7083$e4fe514c@news.kpn.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 6 Dec 2018 16:43:37 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="44281552a237ff4b8a0a5bcbba974df3"; logging-data="19009"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mTC+lsqSWYjpcnjelotEqXyoZk1KNNnA=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cancel-Lock: sha1:zHPZR04XUWAplo0grIshNccjM0c= In-Reply-To: <5c08c0d3$0$7083$e4fe514c@news.kpn.nl> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:54975 Date: 2018-12-06T17:43:37+01:00 List-Id: On 12/6/18 7:25 AM, ldries46 wrote: > What is the principal difference between the Attributes 'ADDRESS and 'ACCESS? > When do you use them? The principal difference is that 'Address returns a value of type System.Address and 'Access returns a value of an access type. They are not the same and there is not necessarily any relationship between them. From ARM K.2(2-7) Language-Defined Attributes: 2 P'Access For a prefix P that denotes a subprogram: 3 P'Access yields an access value that designates the subprogram denoted by P. The type of P'Access is an access-to-subprogram type (S), as determined by the expected type. See 3.10.2. 4 X'Access For a prefix X that denotes an aliased view of an object: 5 X'Access yields an access value that designates the object denoted by X. The type of X'Access is an access-to-object type, as determined by the expected type. The expected type shall be a general access type. See 3.10.2. 6/1 X'Address For a prefix X that denotes an object, program unit, or label: 7 Denotes the address of the first of the storage elements allocated to X. For a program unit or label, this value refers to the machine code associated with the corresponding body or statement. The value of this attribute is of type System.Address. See 13.3. http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-K-2.html -- Jeff Carter "Why, the Mayflower was full of Fireflies, and a few horseflies, too. The Fireflies were on the upper deck, and the horseflies were on the Fireflies." Duck Soup 95