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=unavailable 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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Tue, 28 Jul 2015 08:23:26 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="0b8a1d07de517ba95be21a60d7133ef5"; logging-data="30230"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187xB+rjM+6hmEkwrxMmvLjWKJwU6Cbfro=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:tJYsURbTg5SLmGnJ5WnHb/rnY/A= sha1:xmbbi2Nq2TNk+tn+cCzi4fWr81c= Xref: news.eternal-september.org comp.lang.ada:27070 Date: 2015-07-28T08:23:26+01:00 List-Id: EGarrulo writes: > On Monday, July 27, 2015 at 11:14:35 PM UTC+2, Jeffrey R. Carter wrote: >> Also, if the OP really thinks he has to replace those 3 lines with 1 >> line, he can define >> >> procedure Checked_Trace (Me : in Whatever; Message : in String); >> >> to do so. > > Thanks for the suggestion. Actually, I had thought about this > solution, but since messages are likely to be formatted, if they won't > be logged then the time spent to format them will be wasted along with > memory allocations. But it seems that there are no simple > alternatives. GNAT has pragma Debug[1] for this purpose. I never found much use for it, because it is enabled by -gnata, which is the same switch used to control assertions. There are, I suspect, more fine-grained methods of control now[2], but I've not needed to get to grips with configuration pragmas. [1] https://gcc.gnu.org/onlinedocs/gnat_rm/Pragma-Debug.html [2] https://gcc.gnu.org/onlinedocs/gnat_rm/Pragma-Check_005fPolicy.html