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,4bad154e6810a16c X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: Elaboration Problem Date: 1999/06/15 Message-ID: #1/1 X-Deja-AN: 489897822 References: Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Newsgroups: comp.lang.ada Date: 1999-06-15T00:00:00+00:00 List-Id: cdecker@snet.net (Decker, Christian R) writes: > I have a constant being declared inside a generic where the value being used > for the constant is obtained from > a lookup table. Later on in a subprogram the constant value is used rather > than the lookuptable and to my suprise > the constant is not correct. > > if i do a comparison between the constant and the lookup table value in the > same subprogram they are not equal. > > Has anyone ever seen behavior like this? > > Is this an elaboration problem where the constant is being assigned a value > before the Ada package that the > lookup table resides in elaborates? > > any suggestions? Elaboration order problems should raise Program_Error; make sure you have elaboration checks turned on. Otherwise, post the code, so we can see what the code is really doing (often different from what you thought you wanted the code to do :). -- Stephe