comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@escmail.orl.mmc.com>
Subject: Re: Zoo question
Date: 1996/08/14
Date: 1996-08-14T00:00:00+00:00	[thread overview]
Message-ID: <3211EA8F.167EB0E7@escmail.orl.mmc.com> (raw)
In-Reply-To: 4uskjf$ilg@zeus.orl.mmc.com


Bob Gilbert wrote:
> 
> In article <3211C9C6.41C67EA6@escmail.orl.mmc.com>, Ted Dennison <dennison@escmail.orl.mmc.com> writes:
> > where integer_type is an ananoymous base type, snd predefined_integer_type
> > can be any predefined integer type the compiler wants, as long as it
> > includes 1 and 5.
> >
> > Thus the base type is NOT integer.
> 
> I guess I should have said that the base type of Animal_ID is *equivalent* to
> or derived from type integer, at least as far as the constraints are concerned.

Close. However, integer is not the only predefined "integer type" allowed.
Thus it could well be something like Short_Integer that the compiler 
chooses to derive Animal_ID's base type from.

Of course this is a nit upon a nit. In effect if not in detail, you were
correct (and at a certian level of detail, we are all incorrect).

> 
> > However, the base type's range may well be the same as integer's.
> 
> As I would expect it to be.

It may also be 1/2 the range, or 1/4, or 2*, or some bizzare unrelated 
range.

>>(more of my prattling deleted)
> 
> That's what I said (I think).  The attribute 'Succ is not constrained to
> the specified range 1 .. 5, but I think I would expect a constraint check
> to raise an exception when making the assignment back to Next_Animal.

Yes, that is what you said. The part that got me was saying that the base type
was integer. But the effect is (probably) the same.

However, I should (and did) point out that the constraint check does NOT have
to happen (and does not have to happen within the begin block). That is why 
Ada (95) now has the 'valid attribute.

-- 
T.E.D.          
                |  Work - mailto:dennison@escmail.orl.mmc.com  |
                |  Home - mailto:dennison@iag.net              |
                |  URL  - http://www.iag.net/~dennison         |




  reply	other threads:[~1996-08-14  0:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-12  0:00 Zoo question Ken Garlington
1996-08-12  0:00 ` Chris Morgan
1996-08-13  0:00   ` Ken Garlington
1996-08-13  0:00 ` Ted Dennison
1996-08-14  0:00   ` Ken Garlington
1996-08-14  0:00     ` Ted Dennison
1996-08-15  0:00       ` Ken Garlington
1996-08-18  0:00         ` Robert Dewar
1996-08-19  0:00           ` Ted Dennison
1996-08-19  0:00             ` Mark A Biggar
1996-08-20  0:00             ` Robert Dewar
1996-08-15  0:00       ` Robert A Duff
1996-08-15  0:00     ` Robert Dewar
1996-08-15  0:00       ` Bob Gilbert
1996-08-19  0:00         ` Ted Dennison
1996-08-16  0:00       ` Ken Garlington
1996-08-19  0:00       ` Ted Dennison
1996-08-15  0:00   ` Keith Thompson
1996-08-14  0:00 ` Paul Hussein
1996-08-14  0:00 ` Bob Gilbert
1996-08-14  0:00   ` Ted Dennison
1996-08-14  0:00     ` Bob Gilbert
1996-08-14  0:00       ` Ted Dennison [this message]
1996-08-14  0:00         ` Bob Gilbert
1996-08-14  0:00           ` Ken Garlington
1996-08-15  0:00             ` Robert A Duff
1996-08-16  0:00             ` Bob Gilbert
1996-08-19  0:00               ` Ted Dennison
1996-08-25  0:00                 ` Robert Dewar
1996-08-15  0:00           ` Robert I. Eachus
1996-08-15  0:00 ` John Herro
1996-08-16  0:00   ` Robert Dewar
1996-08-18  0:00     ` John Herro
1996-08-19  0:00       ` Ken Garlington
replies disabled

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