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,9862c21fee63f95c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-10 23:50:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-pas-nf2!newsfeed.earthlink.net!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc03.POSTED!not-for-mail Message-ID: <3EE6D120.2020701@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Visibility and Elaboration References: <3EE4CE96.6030002@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1055314216 24.62.164.137 (Wed, 11 Jun 2003 06:50:16 GMT) NNTP-Posting-Date: Wed, 11 Jun 2003 06:50:16 GMT Organization: AT&T Broadband Date: Wed, 11 Jun 2003 06:50:16 GMT Xref: archiver1.google.com comp.lang.ada:38954 Date: 2003-06-11T06:50:16+00:00 List-Id: tmoran@acm.org wrote: >>Tasks created by allocators are a more common case of >>elaboration after the main program starts execution. > > "we elaborate declarations and execute statements", Barnes, > "Programming in Ada 95". Are you using the term in a different > (more restricted) way? Not at all. Most things that require elaboration occur in library packages, so that the elaboration occurs before the main program executes. (And some are in the declarative part of the main procedure, you can argue whether they come before or after the main program starts executing.) But some declarations occur in declare blocks, or in the declarative part of a task or in one of several other areas where elaboration csn occur well after the main program starts executing. The usual place I see people getting confused by this is in generics. Some things are elaborated when the generic declaration is elaborated, other elaborations occur when the generic body is elaborated. Finally the generic instance itself is elaborated. Technically all three of these can occur after the main program is elaborated. The most common case is that the generic declaration and generic body are elaborated before the main program. Often instances of generics are elaborated after the main program is running. When I taught Ada, one of the classroom exercises was to study an example where some parameters for the generic instantiation were read in by the main program, in particular the range of an array subtype.