From: rlk@rational.com (Bob Kitzberger)
Subject: Re: Debug code
Date: 1996/03/15
Date: 1996-03-15T00:00:00+00:00 [thread overview]
Message-ID: <4icema$opi@rational.rational.com> (raw)
In-Reply-To: 1996Mar14.223326.13730@nosc.mil
Kelly J. Grant (grantk@manta.nosc.mil) wrote:
: I'm also a big fan of providing methods like Show( title, value ),
: with overloads for various types to use for displaying values, such as
: integer, string and boolean. Leave all this code in during
: development, and when you deliver, you could replace the package debug
: body with no-op functions (with a pragma INLINE), and you then won't
: pay a performance penalty. It is also handy to add a defaulted parameter
: at the end with a boolean to indicate whether or not to add a new_line
: for times when you want multiple values on the same line.
Along a similar vein... I find it useful to define a Image function
for ADTs:
package Pencil is
type Object is private;
function Image( The_Object : Object ) return String;
...
Force of habit, it usually only takes a minute to write an Image
function for a new ADT, and it comes in surprisingly handy
for inclusion in a debug setup like you describe above. I find
defining a function that returns a string is more flexible than
defining a subprogram that writes to stdout, e.g.
--
Bob Kitzberger Rational Software Corporation rlk@rational.com
next parent reply other threads:[~1996-03-15 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1996Mar14.223326.13730@nosc.mil>
1996-03-15 0:00 ` Bob Kitzberger [this message]
1996-03-15 0:00 ` Debug code David Weller
1996-03-18 0:00 ` Robert Dewar
1996-03-18 0:00 ` Robert A Duff
[not found] ` <dewar.827166947@schonberg>
1996-03-19 0:00 ` Norman H. Cohen
1996-03-25 0:00 Debug Code Sundog Software
1996-03-25 0:00 ` Robert Dewar
-- strict thread matches above, loose matches on Subject: below --
1996-02-27 0:00 Jerry Blasdel
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox