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,634259facc42df7a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!news.germany.com!news.belwue.de!kanaga.switch.ch!switch.ch!news.in2p3.fr!in2p3.fr!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Conditional compilation of debug traces without cpp Date: Thu, 06 Jul 2006 09:59:55 +0200 Organization: Adalog Message-ID: <4ufi8e.ig7.ln@hunter.axlog.fr> References: <44aaae35$0$5389$626a54ce@news.free.fr> <44ac1562$0$10269$636a55ce@news.free.fr> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1152172868 5690 195.25.228.57 (6 Jul 2006 08:01:08 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 6 Jul 2006 08:01:08 +0000 (UTC) User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) In-Reply-To: <44ac1562$0$10269$636a55ce@news.free.fr> Xref: g2news2.google.com comp.lang.ada:5532 Date: 2006-07-06T09:59:55+02:00 List-Id: guillaume.portail@grospied.enanglais.com a �crit : > Jean-Pierre Rosen wrote: > >> Switching packages is then not more difficult than changing a #define... > > Nice, thank you ! And thank you for your Debug package, I already know > about it. Forgot to mention: make the fake debug pure, to avoid any elaboration. > But don't you think that the elaboration of the calls will still exist ? > Executing the statement : > > Null_Proc ("I was here" & Function_Call(A+12)); > > will always produce a call to Function_Call, even if Null_Proc has a > null body, I guess. Don't want to be pedantic, but just to make sure there is no confustion: - A declaration is elaborated - A statement is executed - An expression is evaluated Therefore yes, the *execution* of the call will always involve the *evaluation* of the parameters (unless the compiler can prove that this evaluation has no side-effects - like a call to a function declared in a pure package). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr