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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,baa6871d466e5af9 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: AQ&S Guidance on pragma Elaborate_Body Date: 1997/04/24 Message-ID: #1/1 X-Deja-AN: 237107518 References: <528878564wnr@diphi.demon.co.uk> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-04-24T00:00:00+00:00 List-Id: In article , Matthew Heaney wrote: >What should the instantiator do if the generic has a pragma Pure, Preelab, >or Elab_Body? Does the instantiator still have to pragma Elaborate_All the >generic package? Or can he omit that pragma? Elab_All can be omitted in this case, which is one reason why Pure, Preelab, and Elab_Body are so convenient. (Robert has pointed out how to put debugging statements in Pure units -- if you're not using GNAT, you can cheat in a similar way by calling some pragma-Imported thing -- which I suppose could be written in Ada.) >Can you explain when exactly does the pragma Pure of the generic package >apply? During elaboration of the generic, or of the instantiation? The generic. If you want the instance to be pure, you have to put the pragma on the instance (if its a lib unit), or on the containing lib unit. This last is not obvious from the RM -- there's an AI on this issue. - Bob