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-Thread: 103376,575dfcf6488662de X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Thomas Lotze Newsgroups: comp.lang.ada Subject: Re: Libraries written in Ada Date: Tue, 23 Nov 2004 14:53:09 +0100 Message-ID: References: <18687975.p80OmDsB1I@linux1.krischik.com> <1464020.dFWPVBaaRG@linux1.krischik.com> <1966293.u6rVSTIjq0@linux1.krischik.com> <29776258.sBDdEVhOhy@linux1.krischik.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de ZNHvBwzjzWELSpjOKaePyAFGlM2bS/sQcKAYJpw5Jmz46Hxv28 User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Xref: g2news1.google.com comp.lang.ada:6378 Date: 2004-11-23T14:53:09+01:00 List-Id: On Tue, 23 Nov 2004 13:36:02 +0100, Martin Krischik wrote: > You can restrict packages to not use specific elaboations: > > pragma Pure (); > pragma Preelaboreate (); > > The pragmas are for the Annex E where these things are more important than > in normal development. Ah, now I found what I was looking for. The ARM really makes for some reading... >> So it's not possible to reset a package in the midst of program >> execution? If so, is it a conscious design decision, and what's the >> rationale? (The solution seems to be offering reset functionality in the >> package.) > > A conscious design decision: > > package > Test > is > > Y : constant Integer = X (...); > > end Test; > > Do I have to explain it or do you spot it yourself ;-) . The value of the constant might be different after a hypothetical re-elaboration. So there would still be no problem if a constant was understood to not change its value _after_ elaboration. In your example I'd have a constant of unknown value anyway (or X() would have to always yield the same value, in which case we'd be discussing a non-existing problem), so you'd be just as fine after a re-elaboration as before provided you treat such an event as a kind of Big Bang and never try to connect information from after it with information from before. But I do admit that this would be a potential well of grief. > With GNAT the binder will automaticly generate the needed code just like > with adainit (). > > The code generated by the binder is stored in some b~ file. It is a normal > Ada source code. In Ada only programms the binder output is deleted > imediatly after linking - in mixed language development the binder output > is not deleted. Yes, I've seen such files. It is possible that adafinal() consists of just one call to Do_Finalize. Can it be omitted in that case? Neither the ARM nor the GNAT RM or UG seem to explain it. > package Interface.C.Strings is only Preelaborate and package Ada.Text_IO > is unmarked. > > And if a package is unmarked then you have to expect both init and term. Too bad. -- Viele Gr��e, Thomas