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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a4cc6fdc99d3fe2a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-26 10:22:28 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3B0FE64F.7D574D2E@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: package body functionality References: <9eoeiv$h8$1@eol.dd.chalmers.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 26 May 2001 17:22:32 GMT NNTP-Posting-Host: 209.86.204.238 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 990897752 209.86.204.238 (Sat, 26 May 2001 10:22:32 PDT) NNTP-Posting-Date: Sat, 26 May 2001 10:22:32 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Sat, 26 May 2001 10:20:40 PDT (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:7805 Date: 2001-05-26T17:22:32+00:00 List-Id: Staffan Dittmer wrote: > > package body A is > variable: some_type:=call_some_function_outside_A; > end A; > > package body B is > variable: some_type; > begin > variable:=call_some_function_outside_B; > end B; > > I know that in B the variable will be assigned > every time a program using the package is run, > but is this also true for A, or will the variable in > this case only be assigned at compile time ? Non-static initialization expressions, such as function calls, are evaluated during elaboration, which happens at run time. Both variables will be initialized during elaboration at run time. -- Jeff Carter "You tiny-brained wipers of other people's bottoms!" Monty Python & the Holy Grail