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,640b65cbfbab7216 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 23 Apr 2008 15:34:06 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada.Strings.Bounded References: <144w648u50r6q.1erjxxu0cplbw.dlg@40tude.net> <611360e0-595c-43a7-b5cb-137a278ec0c1@s13g2000prd.googlegroups.com> <15389tuelo6x6$.1c1a6yixordts$.dlg@40tude.net> <4c1be2a2-0178-4c1f-8c96-526020550f42@w4g2000prd.googlegroups.com> <15514187-d7d0-4650-a058-13ec5684be2c@w5g2000prd.googlegroups.com> <07e98c4f-9b79-412f-9e95-94dd04082355@p39g2000prm.googlegroups.com> <3eb5775f-c7f7-4f92-9154-8f25246b8592@p25g2000hsf.googlegroups.com> <480f1298$0$6782$9b4e6d93@newsspool2.arcor-online.net> <4228dd9a-2616-48af-ba60-cf61e8cd907a@j22g2000hsf.googlegroups.com> In-Reply-To: <4228dd9a-2616-48af-ba60-cf61e8cd907a@j22g2000hsf.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <480f3ace$0$7540$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 23 Apr 2008 15:34:06 CEST NNTP-Posting-Host: 9356f373.newsspool1.arcor-online.net X-Trace: DXC=l9m_EC8lc;U\9P[:DUn00Qic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgRSlg9fQbG8BWnc\616M64>ZLh>_cHTX3j]DeJY2] christoph.grein@eurocopter.com schrieb: >> procedure Ex is >> type E is (A, B, C); >> X: E; >> begin >> X := E'pred(E'succ(C)); >> end Ex; > > You can have this: > > type Enum is (A, B, C, D); > type Sub is new Enum range A .. C; > > Sub'Succ (Sub'Last) = D > Sub'Pred (Sub'Succ (Sub'Last)) = C > > Sub'Base has range A .. D. Yes, but extending the set of values only shifts the (theoretical) problem of 'Succ by one inductive step. Once we forget about the type of unrepresentable numbers the problem ceases to exist, I think.