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,23dabf88feae3dba X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Elaboration worries Date: 21 Jun 2006 19:12:41 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <4fssh9F1ena5jU1@individual.net> <8KOdnYaLZJaLMATZnZ2dnUVZ_tydnZ2d@megapath.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1150931561 320 192.74.137.71 (21 Jun 2006 23:12:41 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 21 Jun 2006 23:12:41 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news2.google.com comp.lang.ada:4889 Date: 2006-06-21T19:12:41-04:00 List-Id: "Randy Brukardt" writes: > I forget the exact reason that Elaborate_Body doesn't work, but the effect > is that you can't count on it to eliminate elaboration problems completely. Hmm. Dispatching calls at elab time, maybe? Elab_Body does ensure that the body will be elaborated before all clients. > (a) make your package Preelaborate if possible (Pure is so limited that > no real packages ever qualify) -- but this is usually impossible because I/O > and Calendar aren't Preelaborate. Which means that you can't trace or log a > Preelaborate package (well, there *is* one way to do it, but it adds runtime > overhead); I have put debug output code in Pure and Preelab packages by "cheating". Like this: write a simple I/O package (I like to avoid the complexity of Text_IO). Use pragma Export(Ada) on all of its procedures. Then write another package that declares all the same procedures, with pragma Import(Ada), and put pragma Pure in that. This is cheating, so I only do it for temporary debugging output. - Bob