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: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Mon, 27 Jul 2015 14:14:32 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Mon, 27 Jul 2015 21:13:01 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a3855fbfe1a666be9aefba0563039ed5"; logging-data="26218"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/EuleLyD2ZmaC5t+091+Qbkgp7XZ4Vb1c=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: Cancel-Lock: sha1:/khXd733SMeB++8vn8IierxYMCo= Xref: number.nntp.giganews.com comp.lang.ada:194357 Date: 2015-07-27T14:14:32-07:00 List-Id: On 07/27/2015 01:26 PM, Randy Brukardt wrote: > "EGarrulo" wrote in message > news:e610ca1e-4df6-4fbb-b3a1-ac35694d9072@googlegroups.com... >> I would like to add logging statements to my units. By using >> GNATColl.Traces, I could add lines like this one: >> >> if Active (Me) then >> Trace (Me, "Performing Step " & Step(...)); >> end if; >> >> However, this is too verbose. > > Why? That's how it's done in Ada. The Janus/Ada compiler has literally > thousands of trace messages like the above (we have a fancy menu system to > turn them on and off on the fly in test versions of the compiler), and I > don't think that they have much impact on readability. > > Besides, if you're going to be writing Ada, you're going to be writing code > that's more verbose (in many ways) than C-family languages. It might take > some getting used to, but there is no time better than the present to > getting used to that. 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. -- Jeff Carter "Why don't you bore a hole in yourself and let the sap run out?" Horse Feathers 49