comp.lang.ada
 help / color / mirror / Atom feed
From: adambeneschan@gmail.com
Subject: Re: Need help for constrained type
Date: Thu, 6 Feb 2014 10:57:59 -0800 (PST)
Date: 2014-02-06T10:57:59-08:00	[thread overview]
Message-ID: <b76e8690-1f31-4ba3-8b93-33ab59cbb5c8@googlegroups.com> (raw)
In-Reply-To: <bli330Fl1b0U1@mid.individual.net>

On Thursday, February 6, 2014 10:37:30 AM UTC-8, Niklas Holsti wrote:

> >> (If you want to allow an empty Usage_Info, indexed 0..-1 for
> >> example, you must of course declare Memory_Block.last using some
> >> range which includes negative numbers, for example Integer.)
> 
> > That actually isn't true. 
> 
> It is here, I think, because the upper bound comes from a discriminant,
> where subtypes are checked more strictly.

Sorry, I misunderstood your point.  Yes, you'd need to make sure the discriminant subtype can handle the upper bound.  But the array *index* subtype can still be "Natural range <>".  Now that I rechecked, I see that I just didn't read your previous post carefully.

                                 -- Adam

  reply	other threads:[~2014-02-06 18:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-06 16:13 Need help for constrained type Gerd
2014-02-06 17:30 ` Niklas Holsti
2014-02-06 18:03   ` adambeneschan
2014-02-06 18:37     ` Niklas Holsti
2014-02-06 18:57       ` adambeneschan [this message]
2014-02-06 17:37 ` G.B.
2014-02-07 14:11   ` Mike H
2014-02-10 11:40     ` G.B.
2014-02-07  0:04 ` Jeffrey Carter
replies disabled

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