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,75ce2ead897158b2 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.72.199 with SMTP id n7mr3656408qaj.5.1364623511731; Fri, 29 Mar 2013 23:05:11 -0700 (PDT) X-Received: by 10.50.178.244 with SMTP id db20mr129325igc.12.1364623511574; Fri, 29 Mar 2013 23:05:11 -0700 (PDT) Path: v17ni6816qad.0!nntp.google.com!ca1no17269629qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 29 Mar 2013 23:05:11 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.228.52.174; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 173.228.52.174 References: <0c77e832-e12b-446d-af24-78d77c358f1e@googlegroups.com> <25ee066d-3270-4efd-829f-ed40b04c0655@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <89292c53-1d4e-48a7-b2ae-a10983ef4168@googlegroups.com> Subject: Re: My bug or else regarding Visibility Rules From: Anh Vo Injection-Date: Sat, 30 Mar 2013 06:05:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-03-29T23:05:11-07:00 List-Id: On Thursday, March 28, 2013 3:03:13 PM UTC-7, Randy Brukardt wrote: > "Adam Beneschan" wrote in message > news:25ee066d-3270-4efd-829f-ed40b04c0655@googlegroups.com... > > On Thursday, March 28, 2013 12:54:26 PM UTC-7, Anh Vo wrote: > >> For the codes below GNAT complains that In_Index, Buffer, and Out_Index > >> are undefined. > > However, if I comment out private key word, GNAT is happy. Did I violate > > Ada syntax rules? Thanks. > > > > 13.1.1(11): The usage names in an aspect_definition [ are not resolved at > > the point of the > >associated declaration, but rather] are resolved at the end of the > >immediately enclosing declaration list. > > > > In your example, the "immediately enclosing declaration list" ends at the > > keyword PRIVATE > > when that keyword is present; but if you take it out, the declaration list > > ends at "end Circular_Queue;". > > Which is the long way to say that the expression of a public aspect has to > be made up only of public functions and objects. Otherwise, how would a > caller be able to figure out the meaning of a precondition that they are > required to meet? Clients can never be required to look in a private part. Actually, this part only involves post-conditions (implementer), not preconditions (clients). A. Vo