comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen & Tammy House <house@ro.com>
To: Chris Sparks <sparks@AISF.COM>
Subject: Re: Program identification
Date: 1996/09/02
Date: 1996-09-02T00:00:00+00:00	[thread overview]
Message-ID: <322B6652.44CD@ro.com> (raw)
In-Reply-To: INFO-ADA%96082914161709@LISTSERV.NODAK.EDU


Chris Sparks wrote:
> 
> Does anyone know of a way to determine the program name within a program
> without explictly making a constant for it.  If there isn't a way then
> maybe a new attribute should be made for the next version of Ada, namely:
> 
> P'Identity which returns a string, P is a program unit
> 
> I am using this information as part of an exception reporter system.
> 
> BTW these would be helpful too:
> 
> P'Location which returns a string, P is a program unit and the string would
> contain the current line number in the source code, or maybe even the previous
> line number (for exception processing).
> 
> Any thoughts?
Exceptions tend to be tacked on to a design.  But proper exception
definition is just as important as subprogram and parameter definitions.

Exceptions are, in fact, a set of boolean parameters passed out of a
subprogram call.  They are different in that if any of these parameters
goes high none of the rest of the data coming out of the call may mean
anything.

Your exception definitions should tell your handlers what blew up and
why.  Ada95 has a few more tricks added for exceptions than Ada83.  But,
as always, there is no substitute for a good design.




  parent reply	other threads:[~1996-09-02  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-29  0:00 Program identification Chris Sparks
1996-08-31  0:00 ` Robert A Duff
1996-08-31  0:00   ` Ray Blaak
1996-08-31  0:00     ` Robert A Duff
1996-08-31  0:00 ` Dale Stanbrough
1996-08-31  0:00 ` Ray Blaak
1996-09-02  0:00 ` Stephen & Tammy House [this message]
1996-09-03  0:00 ` David C. Hoos, Sr.
1996-09-13  0:00 ` James A. Krzyzanowski
1996-09-14  0:00   ` Ken Garlington
1996-09-15  0:00     ` Larry Kilgallen
  -- strict thread matches above, loose matches on Subject: below --
1996-08-31  0:00 tmoran
1996-08-31  0:00 ` Robert A Duff
1996-09-02  0:00 tmoran
1996-09-03  0:00 ` Joel VanLaven
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox