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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd63afa4dc364b7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-22 14:06:13 PST Path: supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!grolier!newsfeed.planete.net!psinet-france!psiuk-f4!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Implementing C/C++ style #include... Date: Thu, 22 Mar 2001 16:42:07 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <99drjt$nae$1@nh.pace.co.uk> References: <98m938$2iod0$1@ID-25716.news.dfncis.de> <3ab9f314.13778993@news.geccs.gecm.com> <99d2ao$ecu$1@nh.pace.co.uk> <99dpom$169$1@neptunium.btinternet.com> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 985297341 23886 136.170.200.133 (22 Mar 2001 21:42:21 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 22 Mar 2001 21:42:21 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: supernews.google.com comp.lang.ada:6012 Date: 2001-03-22T21:42:21+00:00 List-Id: That is yet another technique for building in debug code - again suitable for a variety of things, but not necessarily a complete answer. (Can't appear in a declarative part and is really a technique for logging output - not a general means of encapsulating general code you'd like to use or not use depending on configuration.) One issue is the potential procedure call overhead - not a concern in most apps, but in some. Possibly with judicious use of "pragma Inline" the compiler may optimize it away. It also may create verification issues if your project has some really tight testing constraints. A bit of a narrower technique for getting some debug code into a program & one I've used in a few situations. It is especially useful if you'd like to keep the debug code in the production app and be able to toggle it on/off at runtime. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "singlespeeder" wrote in message news:99dpom$169$1@neptunium.btinternet.com... > I use a Trace package with two bodies, one which contains null stubs. Then > use the make script to select the right body to load into the Ada library > before compiling. Calls to the trace package don't have to be wrapped in > if-then-else's > > with Trace; > ... > Trace.Log_Line ("some text to log to file") > ... > > Nick > >