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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable 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-09 04:36:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!freenix!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: Visibility and Elaboration Date: Mon, 9 Jun 2003 06:35:41 -0500 Organization: ENST, France Message-ID: References: <7BD8CDF4.671052CE.0015D3EC@netscape.net> NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1055158580 7555 137.194.161.2 (9 Jun 2003 11:36:20 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 9 Jun 2003 11:36:20 +0000 (UTC) To: , Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:38855 Date: 2003-06-09T06:35:41-05:00 ----- Original Message ----- From: To: Sent: June 09, 2003 5:47 AM Subject: Visibility and Elaboration > David C. Hoos, Sr. wrote: > >If you look at your original post (on June 4), there was no "put_line" > >statement -- hence, the reason for my question > Ok, your right, there was no put_line statement. There was only the > "put" statement. The compiler would still have complained. The compiler did _not_ complain when the unneeded "with" of Ada.Text_IO was removed. > > >GNAT did _not_ tell you it didn't know which one to use. > Ok, that must be why I wrote "Thus, GNAT's compiler message tells me > not that GNAT can't determine which count to use but that I need to > specify, for future readers, which count I needed." > > >Using the GNAT compiler, the object file resulting from the > >compilation of your package would contain a procedure named > >my_pkg___elabs. That procedure contains the elaboration code for your > >package specification. > Cool! I'm going to check that out. Thank you. > > >Elaboration is nothing at all like the instantiation of a C++ class. > Ok, elaboration is like the "preparation" of something declared static > in C++ or Java? So your saying that all the elaborations in the > following code happen before the main procedure is called? The only elaborations resulting from the following code are from the Ada standard libraries, viz: ada__exceptions_E system__exception_table_E ada__io_exceptions_E system__exceptions_E system__secondary_stack_E ada__tags_E ada__streams_E system__soft_links_E system__finalization_root_E system__finalization_implementation_E ada__finalization_E ada__finalization__list_controller_E system__file_control_block_E system__file_io_E ada__text_io_E Yes, they are all performed before exection of the main program. Build you main program with the command gnatmake -g newelaboration and look at the file b~newelaboration.adb generated by that process. > > with > ada.text_io, > ada.integer_text_io; > > use > ada.text_io, > ada.integer_text_io; > > procedure newelaboration is > > procedure doelaboration(i: integer) is > package elo is > value: Integer; > procedure printvalue; > end elo; > > package body elo is > procedure printvalue is > begin > put(value); > end printvalue; > end elo; > > begin > if i < 10 then > elo.value := i; > doelaboration(i+1); > elo.printvalue; > end if; > end doelaboration; > > begin > > doelaboration(1); > > end newelaboration; > > So using the "new" reserved word is different than an elaboration? Yes. > > Thanks for the help! > > Andrew > > > __________________________________________________________________ > McAfee VirusScan Online from the Netscape Network. > Comprehensive protection for your entire computer. Get your free trial today! > http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 > > Get AOL Instant Messenger 5.1 free of charge. Download Now! > http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada > >