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,bfa00be8f7a5ae46 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.germany.com!koehntopp.de!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed02.chello.at!news.hispeed.ch.POSTED!not-for-mail Message-Id: <4955204.riu49K6KmB@linux1.krischik.com> From: Martin Krischik Subject: Re: Compare these two (sub)type declarations Newsgroups: comp.lang.ada Date: Wed, 05 Jul 2006 19:42:57 +0200 References: <1152006378.935306.287820@m79g2000cwm.googlegroups.com> User-Agent: KNode/0.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@hispeed.ch Organization: hispeed.ch NNTP-Posting-Host: 80.218.119.160 (80.218.119.160) NNTP-Posting-Date: Wed, 05 Jul 2006 19:45:05 +0200 X-Trace: d21cf44abfaa1f57fd20508571 Xref: g2news2.google.com comp.lang.ada:5508 Date: 2006-07-05T19:42:57+02:00 List-Id: Lance wrote: > What is the difference between these two declarations? > > subtype Foo is Integer; > > and > > type Bar is new Integer; > > In fact, what _is_ the second declaration? Would variables of type Bar > not be allowed in expressions where Integers are expected? Others have given you some hints. If you want the full story: http://en.wikibooks.org/wiki/Ada_Programming/Type_System Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com