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-Thread: 103376,c35edbbda4c7f58f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Conditional compilation in Ada? Date: Wed, 17 Nov 2004 15:44:02 +0100 Message-ID: References: <419b5ff6$0$25329$9b4e6d93@newsread2.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 4coC9XHMz77jEPR0JzSeSwdONApnMOzDbqfZvclLdQqxgOTZ4= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:6252 Date: 2004-11-17T15:44:02+01:00 List-Id: On Wed, 17 Nov 2004 13:32:06 +0100, Georg Bauhaus wrote: > Frank Piron wrote: >> we wanted >> to switch on and off debugging messages for each package >> individually and for certain levels >> We tried with gnatprep but found it not suitable for this >> task. > > Perhaps another option is to have > > package DEBUG renames Silent_Debugging_Procedures; > > or > > package DEBUG renames Debugging_Procedures; > > inside package bodies? Then statements like > > DEBUG.put_line(...); > > might or might not print something. Put_Line (File, ...); -- File is opened on /dev/null or not (:-)) Seriously, the actual problem with that is: DEBUG.put_line ( "Here " & Is.Something ("reasonable complex to evaluate") ); Arguments of put_line will be always evaluated before being thrown away. Alas, Ada does not have lazy formal parameters... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de