From: Christoph Grein <christoph.grein@eurocopter.de>
To: comp.lang.ada@ada.eu.org
Subject: Re: Types, subtypes and ranges
Date: Wed, 14 Mar 2001 14:50:00 +0100 (MET)
Date: 2001-03-14T14:50:00+01:00 [thread overview]
Message-ID: <mailman.984578231.3487.comp.lang.ada@ada.eu.org> (raw)
Anders Wirzenius wrote:
> the 'Image attribute is inherited all the way up as long as
> you don't break the chain of subtypes:
Your wording is not quite correct. Inheritance is used in a different sense only
for type derivation.
Here you have only subtypes, and these are no subtype-specific operations (OK,
there are other subtype-specific attributes like 'Size). Thus e.g.
Integer'Image, Natural'Image, Positive'Image all denote the same operation,
there is no range check involved.
Positive'Image (-1) is absolutely OK and will return "-1" and not raise an
exception.
The rationale behind this is that at some place you might not see the type, only
the subtype.
(To be very precise, you never see a type name, only the first named subtype.)
next reply other threads:[~2001-03-14 13:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-14 13:50 Christoph Grein [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-03-03 1:00 Questions: WM
2001-03-07 23:05 ` Questions: Mark Lundquist
2001-03-12 7:41 ` Types, subtypes and ranges Anders Wirzenius
2001-03-12 11:57 ` David C. Hoos, Sr.
2001-03-12 16:06 ` Tucker Taft
2001-03-13 6:40 ` Anders Wirzenius
2001-03-12 16:57 ` Scott Ingram
2001-03-18 22:28 ` Lao Xiao Hai
2001-03-19 13:22 ` Marc A. Criley
2001-03-20 16:57 ` Lao Xiao Hai
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox