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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3cb83afdaa0ee626 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!news.mixmin.net!aioe.org!not-for-mail From: =?iso-8859-15?Q?Yannick_Duch=EAne_=28Hibou57=29?= Newsgroups: comp.lang.ada Subject: Re: Access types - what's happening here? Date: Wed, 26 May 2010 00:38:03 +0200 Organization: Ada At Home Message-ID: References: <5f5003e9-4b34-4489-be37-360f5c9063b9@e34g2000pra.googlegroups.com> NNTP-Posting-Host: lwoedXCBwVNAtSGnEUHIWA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.53 (Win32) Xref: g2news2.google.com comp.lang.ada:11995 Date: 2010-05-26T00:38:03+02:00 List-Id: Le Wed, 26 May 2010 00:27:39 +0200, KK6GM a =E9crit: > Looking at Cohen's "Ada as a 2nd Language" I see in chapter 8 (Access > Types), p.319, this construct which I do not understand. But first, > the construct I do understand: > > Old_Serial_Number :=3D Serial_Number("Lovelace, Ada").all; > > No confusion about that whatsoever. However, that is followed by > this: > > "More interestingly, the assignment > Serial_Number( "Lovelace, Ada").all :=3D New_Serial_Number; > copies the contenst of the integer variable into the variable > pointed to by the result of the function call." > > Huh? Where does the New_Serial_Number value end up here? As I don't see any trouble here, I'm not sure I've understood the = question. However, here is the answer I give to it as I can understand i= t : If you do Serial_Number( "Lovelace, Ada").all :=3D New_Serial_Number; You get the same thing as if you do Old_Serial_Number :=3D Serial_Number("Lovelace, Ada").all; Old_Serial_Number.all :=3D New_Serial_Number; Can you give a link to the page you are reading ? -- = There is even better than a pragma Assert: a SPARK --# check.