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 09:09:59 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!kilgallen From: Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: package body functionality Message-ID: References: <9eoeiv$h8$1@eol.dd.chalmers.se> Organization: LJK Software Date: 26 May 2001 12:09:55 -0500 NNTP-Posting-Host: 216.44.122.34 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 990893397 216.44.122.34 (Sat, 26 May 2001 16:09:57 GMT) NNTP-Posting-Date: Sat, 26 May 2001 16:09:57 GMT Xref: archiver1.google.com comp.lang.ada:7801 Date: 2001-05-26T12:09:55-05:00 List-Id: In article <9eoeiv$h8$1@eol.dd.chalmers.se>, f97stdi@dd.chalmers.se (Staffan Dittmer) writes: > the question might be a bit obscure but > considering the two package bodies below > > 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 ? call_some_function_outside_A has a body unknown to A, and the results of that call could be time-variant, such as computed differently on weekends. A has no way of knowing this, so the results cannot be computed "at compile time".