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,16e3a8dd4f3ab3f3 X-Google-Attributes: gid103376,public From: Ken Garlington Subject: Re: Elaboration order Date: 1996/03/15 Message-ID: <314972FC.3F86@lfwc.lockheed.com>#1/1 X-Deja-AN: 142838476 references: <314829CD.4FA9@lfwc.lockheed.com> cc: stt@inmet.com content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.0 (Macintosh; I; 68K) Date: 1996-03-15T00:00:00+00:00 List-Id: Tucker Taft wrote: > > You only need a pragma Elaborate[_All](pkg) if you call a subprogram > from "pkg" as part of the *elaboration* of some other package. > > If the calls only appear in subprogram bodies, rather than at > the package level, you shouldn't have any problem. OK. Keeping in mind that I need the answer in terms of Ada 83, then this is what I think I've heard so far: 1. If, in a package specification, I refer to something in another package specification that is not completely defined in the other spec, I need a pragma Elaborate. "Something" can include: - any case where I need the sequence_of_statements in the package body to run prior to the use of the something, such as a variable in the spec which is set in the sequence_of_statements. This case, I think I always understood. - any subprogram (since, otherwise, I could get a Program_Error); although I guess it would have to be a function. This case, I didn't understand. 2. On the other hand, if I refer to a subprogram within another subprogram body, I don't have to use pragma Elaborate. Is there a spec reference for this? What about referring to a subprogram elsewhere in a package body? What about the sequence_of_statements case above? I'm trying to write up an explanation of this issue for our users, since I don't think we understood the extent to which pragma Elaborate was needed. Any assistance in this area in the immediate future would be appreciated. > > -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ > Intermetrics, Inc. Cambridge, MA USA