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,5265ce03ee8f5252 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-06 11:45:53 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!colt.net!newsfeed00.sul.t-online.de!t-online.de!grolier!club-internet!not-for-mail From: Laurent Guerby Newsgroups: comp.lang.ada Subject: Re: Ok sorry, it is just a book gives no feedback. Date: 06 Jan 2001 20:46:13 +0100 Organization: Club-Internet (France) Message-ID: <86hf3c5ure.fsf@acm.org> References: <931r2l$4ai5t$2@ID-25716.news.dfncis.de> <931t08$5u5$1@nnrp1.deja.com> <932632$e0e$1@nnrp1.deja.com> <932an8$ijs$1@nnrp1.deja.com> <93421h$2ju$1@nnrp1.deja.com> <934j5c$eu9$1@nnrp1.deja.com> NNTP-Posting-Host: nas6-245.vlt.club-internet.fr X-Trace: front1m.grolier.fr 978810227 29680 194.158.108.245 (6 Jan 2001 19:43:47 GMT) NNTP-Posting-Date: 6 Jan 2001 19:43:47 GMT X-Newsreader: Gnus v5.7/Emacs 20.5 Xref: supernews.google.com comp.lang.ada:3710 Date: 2001-01-06T19:43:47+00:00 List-Id: "Randy Brukardt" writes: > Indeed, that is why pragma Pure is so hard to use in practice: because > you can't instrument or otherwise debug code controlled by it. About all > you can do is remove the pragma, but that often makes the clients of the > package illegal. Thus debugging these things can be horrible. The trick is to use pragma Import in Pure units to import "unpure" debugging stuff without withing it. package body Of_Pure_Unit procedure Dbg (Msg : in String); pragma Import (Ada, Dbg); -- May need compiler tweaking with link names, plus of course -- a matching Export somewhere in the code. function Not_That_Pure return Integer is begin Dbg ("hello!"); return 0; end Not_That_Pure; end Of_Pure_Unit; -- Laurent Guerby