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: mab@dst17.wdl.loral.com (Mark A Biggar) Subject: Re: Elaboration order Date: 1996/03/15 Message-ID: <4icbnc$cda@wdl1.wdl.loral.com>#1/1 X-Deja-AN: 142869255 references: <314701A1.469D@lfwc.lockheed.com> <31494143.3825@lfwc.lockheed.com> organization: Loral Western Development Labs newsgroups: comp.lang.ada Date: 1996-03-15T00:00:00+00:00 List-Id: In article <31494143.3825@lfwc.lockheed.com> Ken Garlington writes: >Robert A Duff wrote: >[the standard answer, except it didn't explain...] >Why doesn't the subprogram body have to be elaborated before the call? It does. >Should I expect this problem anytime I call a subroutine? It seems >counter-intuitive... No, you only run into this problem when you try to call a routine during the elaboration of a library unit. E.g., when you call a function as part of the initial expression of a package variable or when you call any routine in the begin section of a package body. Note that this is never a problem with your main code as all library units are guarenteed to be elaborated before the main routine is called, so any routine called after that time won't run into this problem. -- Mark Biggar mab@wdl.loral.com