From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,38730e01f356adfa X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!news.agarik.com!194.2.0.24.MISMATCH!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: types and subtypes Date: Tue, 14 Mar 2006 15:39:15 +0100 Organization: Adalog Message-ID: References: <1142251677.837212.109000@i39g2000cwa.googlegroups.com> <1142273325.634632.41020@j52g2000cwj.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1142348474 13582 195.25.228.57 (14 Mar 2006 15:01:14 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 14 Mar 2006 15:01:14 +0000 (UTC) User-Agent: Thunderbird 1.5 (Windows/20051201) In-Reply-To: <1142273325.634632.41020@j52g2000cwj.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:3354 Date: 2006-03-14T15:39:15+01:00 List-Id: ada_student@yahoo.com a �crit : >> Because they are of the same *type*. A subtype does not declare a >> different type, only a restriction (a *constraint*) on the allowed >> values. Since the types are the same, the declaration is OK. >> > > Then Ada's definition of a type is different from other languages. No, Ada's definition of a *sub*type is different. > A type also defines the set of values that an object can have. That's correct. In other languages, a subtype is a sub-type, i.e. a type "sub" (under) another type. In Ada, a type is a set of value; a subtype is a subset of that set. Since a subset is included in the set, a subtype is included in (and of same nature as) the type. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr