comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: Converting C++ class to Ada
Date: 1996/12/20
Date: 1996-12-20T00:00:00+00:00	[thread overview]
Message-ID: <32BAB8C8.7046@gsfc.nasa.gov> (raw)
In-Reply-To: E2o1vz.76y@world.std.com


Robert A Duff wrote:
> 
> In article <JSA.96Dec18184555@alexandria>,
> Jon S Anthony <jsa@alexandria> wrote:
> >> Also, if I wanted to make sure that "null" wasn't used as one of the
> >> discriminants, would I have to use "access Motor.Object_Type" rather
> >> than the declared access type?
> >
> >Neither will prevent that.
> 
> A value of an anonymous access type can never be null.  (This includes
> both access parameters and access discriminants.)  Run-time checks
> ensure this.
> 
> - Bob

I can't find a rule in the RM that says this. In "Ada as a Second
Language", page 491, Norman Cohen says "Elaboration of a discriminant
constraint raises the exception Constriant_Error if the value given for
an access disciminant is null". So I believe an access discriminant
cannot be null, but I'm trying to hone my RM reading skills. Searching
for "access discriminant" gave no rule regarding null values. As Jon
Anthony pointed out, 11.5, which lists ALL defined checks, does not
mention checking access discriminants for null, only access parameters.
So where is the rule?
-- 
- Stephe




  reply	other threads:[~1996-12-20  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-10  0:00 Converting C++ class to Ada Ken Garlington
1996-12-11  0:00 ` Norman H. Cohen
1996-12-12  0:00   ` Jon S Anthony
1996-12-11  0:00 ` Jon S Anthony
1996-12-12  0:00   ` Ken Garlington
1996-12-18  0:00   ` Jon S Anthony
1996-12-18  0:00     ` Matthew Heaney
1996-12-19  0:00     ` Robert A Duff
1996-12-20  0:00       ` Stephen Leake [this message]
1996-12-20  0:00         ` Robert A Duff
1996-12-20  0:00   ` Jon S Anthony
1996-12-20  0:00     ` Mitch Gart
1996-12-20  0:00   ` Norman H. Cohen
1996-12-21  0:00   ` Jon S Anthony
1996-12-11  0:00 ` Larry Kilgallen
1996-12-11  0:00 ` Stephen Leake
1996-12-13  0:00   ` Stephen Leake
1996-12-12  0:00 ` Dale Stanbrough
1996-12-12  0:00   ` Constructors for Ada (was: Converting C++ class to Ada) Matthew Heaney
1996-12-13  0:00     ` Norman H. Cohen
1996-12-13  0:00       ` Matthew Heaney
1996-12-17  0:00   ` Robert I. Eachus
replies disabled

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