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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.2.193 with SMTP id 1mr11562251qak.9.1405446673503; Tue, 15 Jul 2014 10:51:13 -0700 (PDT) X-Received: by 10.50.118.38 with SMTP id kj6mr152524igb.11.1405446673216; Tue, 15 Jul 2014 10:51:13 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!v10no870271qac.1!news-out.google.com!gf2ni861igb.0!nntp.google.com!h18no2139527igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 15 Jul 2014 10:51:12 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <53c4d9ec$0$6658$9b4e6d93@newsspool3.arcor-online.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Position of "use" From: Adam Beneschan Injection-Date: Tue, 15 Jul 2014 17:51:13 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2613 X-Received-Body-CRC: 3655682439 Xref: news.eternal-september.org comp.lang.ada:20947 Date: 2014-07-15T10:51:12-07:00 List-Id: On Tuesday, July 15, 2014 10:01:12 AM UTC-7, Simon Wright wrote: > But, in Ada83, a *pragma*'s scope extended over the whole compilation > (all the compilation units). I don't know that this was universally true; I don't see a general rule to = that effect. The rules vary from pragma to pragma. STORAGE_UNIT and SYSTE= M_NAME (since removed) had to appear at the beginning of a compilation and = applied to every compilation unit in the compilation (this seems to anticip= ate the "configuration pragma" rules of Ada 95 and beyond). ELABORATE, how= ever, appears in a context clause (as does the "use" clause) but only appli= es to one compilation unit. Most of the pragmas were only allowed inside d= eclarations. LIST(ON) and LIST(OFF) apply to the entire compilation, of co= urse, but since it controls only the listing output and has no effect on se= mantics or generated code, it's really a special case. Implementation-defi= ned pragmas follow whatever rules the vendor decides they should. I think the situation is pretty much the same in Ada 95+, except a little m= ore formalized. There's no one rule defining the scope of pragmas, but the= re are rules for categories of pragmas (in particular "configuration pragma= s"). -- Adam