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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7508aa0d80b8bf66 X-Google-Attributes: gid103376,public From: Paul Duquennoy Subject: Re: Inheritance and Polymorphism in Ada !! Date: 1999/10/21 Message-ID: <380EB17F.9A6D1CBD@wanadoo.fr>#1/1 X-Deja-AN: 538725190 Content-Transfer-Encoding: 7bit References: <7u64k3$l1d$1@hiline.shinbiro.com> <3806DC34.1513E8B1@frqnet.de> <7u7o36$tv8$1@nntp6.atl.mindspring.net> <38077b65_1@news1.prserv.net> <7uitmi$2vg$1@nnrp1.deja.com> X-Accept-Language: fr,fr Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@wanadoo.fr X-Trace: wanadoo.fr 940487039 9930 164.138.154.62 (21 Oct 1999 06:23:59 GMT) Organization: Wanadoo, l'internet avec France Telecom Mime-Version: 1.0 Reply-To: paul.duquennoy@wanadoo.fr NNTP-Posting-Date: 21 Oct 1999 06:23:59 GMT Newsgroups: comp.lang.ada Date: 1999-10-21T06:23:59+00:00 List-Id: Robert A Duff a *crit : > Another example: I often want to add a statement at the beginning of a > procedure. I want it to happen before anything else. Maybe a debugging > print-out, for example. Or maybe some sort of checking on the input > parameters, like an assertion. If I put it after the "begin", I will > miss all the elaborations. So I have to surround the whole procedure > with a block statement, and *then* add my new statement. I wouldn't > mind adding the verbosity if it helped the reader, but I think it does > just the opposite. For such debug printouts before any declarations, I often use a function : function Debug_Printout (Mess : in String) return boolean is begin Ada.Text_Io.Put_Line (Mess); return true; end Debug_Printout; Then I can insert it in my procedure : procedure X (...) is Dummy_1 : constant Boolean := Debug_Printout ("Start of declarations"); ..... It prooved usefull to track exceptions occuring during initialisations. Paul