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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Tue, 28 Jul 2015 14:54:45 +0200 Organization: cbb software GmbH Message-ID: <1ipfeas9434z5.o8661mp0cpkh.dlg@40tude.net> References: <1ckwx9hern944$.1w0k6fbvlqo62$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 5CNUwuQ0q1vZOSDFkeKrYQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:27083 Date: 2015-07-28T14:54:45+02:00 List-Id: On Tue, 28 Jul 2015 05:06:29 -0700 (PDT), EGarrulo wrote: > On Tuesday, July 28, 2015 at 1:51:45 PM UTC+2, Dmitry A. Kazakov wrote: >> Because *What* must be evaluated lazily, which is not possible in Ada. That >> is why the only way to do it is, IMO, as Randy had suggested: >> >> if Is_On (Trace_Topic) then >> Trace (Trace_Topic, ); >> end if; > > But this means a 2/1 ratio of noise to signal. Actually it is 3/0 vs. 1/0. Since both are infinities there is no much difference. Furthermore the trace expressions, in the real life, take more than one line anyway. > The other way to > accomplish this would be by means of a preprocessor, hence my question > about how to integrate a preprocessor in the Ada build chain. Preprocessor is never a way. You can inline the suggested wrapper and hope that the compiler indeed does inlining than effectively will make it lazily evaluated. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de