From: Paul Duquennoy <paul.duquennoy@wanadoo.fr>
Subject: Re: Inheritance and Polymorphism in Ada !!
Date: 1999/10/21
Date: 1999-10-21T06:23:59+00:00 [thread overview]
Message-ID: <380EB17F.9A6D1CBD@wanadoo.fr> (raw)
In-Reply-To: wcchfjmx7y5.fsf@world.std.com
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
next prev parent reply other threads:[~1999-10-21 0:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-15 0:00 Inheritance and Polymorphism in Ada !! Chango Cho
1999-10-15 0:00 ` Andreas Winckler
1999-10-15 0:00 ` Lutz Donnerhacke
1999-10-15 0:00 ` Richard D Riehle
1999-10-15 0:00 ` Matthew Heaney
1999-10-15 0:00 ` Richard D Riehle
1999-10-18 0:00 ` Robert A Duff
1999-10-19 0:00 ` Robert Dewar
1999-10-20 0:00 ` Robert A Duff
1999-10-21 0:00 ` Robert Dewar
1999-10-21 0:00 ` Paul Duquennoy [this message]
1999-10-21 0:00 ` Simon Wright
1999-10-21 0:00 ` Robert A Duff
1999-10-22 0:00 ` Matthew Heaney
1999-10-18 0:00 ` Robert Dewar
1999-10-23 0:00 ` Richard D Riehle
1999-10-24 0:00 ` Robert Dewar
1999-10-24 0:00 ` Brian Rogoff
1999-10-26 0:00 ` Robert Dewar
1999-10-25 0:00 ` Robert A Duff
1999-10-26 0:00 ` Robert Dewar
1999-10-26 0:00 ` Robert A Duff
1999-10-15 0:00 ` Stephane Barbey
1999-10-15 0:00 ` Matthew Heaney
1999-10-18 0:00 ` Robert A Duff
1999-10-18 0:00 ` Brian Rogoff
1999-10-15 0:00 ` tmoran
1999-10-15 0:00 ` tmoran
1999-10-18 0:00 ` Robert A Duff
1999-10-15 0:00 ` Ted Dennison
1999-10-15 0:00 ` Lutz Donnerhacke
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox