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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f09e92546a4da9a5,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-14 05:59:32 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!karthurs From: karthurs@vnet.ibm.com (Keith Arthurs) Newsgroups: comp.lang.ada Subject: Re: "Common" data Date: Thu, 13 Oct 1994 13:22:01 GMT Organization: McDonnell Douglas Corporation Message-ID: <19941013.092201.114@vnet.ibm.com> Reply-To: karthurs@vnet.ibm.com (Keith Arthurs) NNTP-Posting-Host: wmavm7.gburg.ibm.com Date: 1994-10-13T13:22:01+00:00 List-Id: In article <9410121737.AA28756@eurocontrol.de>, on Wed, 12 Oct 1994 18:37:08 +0100, Bob Wells >Subject: "Common" data >From: Bob Wells #402 >Newsgroups: comp.lang.ada >Message-ID: <9410121737.AA28756@eurocontrol.de> >Date: Wed, 12 Oct 1994 18:37:08 +0100 > >G'day, >Where abouts in the LRM does it say that I will only have one copy >of the variable T in the following code? This is naturally what you >would expect, that A.New_T_Value and B.New_T_Value would be working >on the same T, but is this defined in the LRM? > >This is a trivialization of some comms code delivered to us, and we >wanted to see if the behaviour was defined by the LRM. > [code Snipped] >>Thanks!> In the LRM section 7.3:3 it states that a variable declared in the body of a package is only visible within this body... This defines the "visibility" of the variable as within the package body. The paragraph goes on to say that the the value of such a variable remains unchanged between calls issued from outside the package to subprograms declared in the visible part. This defines the "scope" as the life of the program. So when you call a routine in package common, no matter where it is being called from, it is working on the same storage. Keith Arthurs McDonnell Douglas Corporation Disclaimer: I do not intend for the above commentary to reflect any opinions of McDonnell Douglas. If they do its by pure coincidence.