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!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Sat, 01 Aug 2015 09:33:51 +0100 Organization: A noiseless patient Spider Message-ID: References: <2df4698f-4c8e-457c-822d-209cb2f8ab5e@googlegroups.com> <014427b1-ff7a-4a69-82e6-0330af77ed96@googlegroups.com> <91f88d79-197c-419f-84a8-908e05967a2c@googlegroups.com> <135c2b00-d13c-4f5d-a586-8aca442d363b@googlegroups.com> <87380683vc.fsf@adaheads.sparre-andersen.dk> <347c6be9-c918-4bc0-9494-c93cd6740def@googlegroups.com> <4cb32c40-f659-490d-bbb6-73585fc069e8@googlegroups.com> <7e653a88-e690-431a-9df9-3fc691466e08@googlegroups.com> <25e8deb9-a967-4856-97cb-4257e1ba7fa4@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="fbe1d5b0173017f7cc2ccfa8ad3bc8c1"; logging-data="22477"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bn5U311xA2M6bLlU7EK7666K+Sj6vfyM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:4KyP8WrapapZMMYUIlRVSjhI0lE= sha1:8pwE/C3BQJbOF6bqGtZPUa+el1E= Xref: news.eternal-september.org comp.lang.ada:27289 Date: 2015-08-01T09:33:51+01:00 List-Id: EGarrulo writes: > if Some_Condition then > declare > with Ada; use Ada; > begin > Singleton := Singleton_Package.Singleton_Instance; -- Read variable. > -- Use singleton. > end; > end if; > > But the compiler complains that "aspect specifications not allowed > here". Or does "with Package" put a package in scope without > elaborating it until "use Package", and therefore I should have left > only the "use" directive? "with Pkg" can only occur in a compilation unit's context clauses. "use Pkg" can appear there, and also in a declarative region (e.g. your "declare" section). "use" has no effect on elaboration, only on visibility. See ARM 10.2, Program Execution. http://www.adaic.org/resources/add_content/standards/12rm/html/RM-10-2.html