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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4fb6ec6cd054de65 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-12 01:38:40 PST From: "George Stevens" Newsgroups: comp.lang.ada References: <3c8cc63b$1@pull.gecm.com> Subject: Re: constrained subtypes Date: Tue, 12 Mar 2002 09:39:29 -0000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: wv174493.wloovle.gmuwd.gecm.com Message-ID: <3c8dcc9d$1@pull.gecm.com> X-Trace: 12 Mar 2002 09:38:37 GMT, wv174493.wloovle.gmuwd.gecm.com Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!btnet-peer1!btnet-feed3!btnet!newreader.ukcore.bt.net!pull.gecm.com!wv174493.wloovle.gmuwd.gecm.com Xref: archiver1.google.com comp.lang.ada:21099 Date: 2002-03-12T09:39:29+00:00 List-Id: Problem seemed to be in using: case (constrained_subtype) rather than: case constrained_subtype Removing the brackets sorted the problem. Not sure why this is a problem for constrained subtypes, as the compilers cope fine for enums and (base) integers. Sorry I didn't put the original code in my post, but was away from my build machine, so was relying on my memory. Thanks for all reponses. "George Stevens" wrote in message news:3c8cc63b$1@pull.gecm.com... > We're trying to use subtypes of base integer, constraining them 1 .. 8 > (i.e. static values) > When we use these types in a case statement, covering values 1 - 8, the > Aonix Ada compiler (7.1.2) complains that we haven't defined "others". > However, we shouldn't need to, as all cases are within the constrained > limits. I've looked at Programming in Ada 95 - Barnes (p106) which seems to > suggest that we're doing the right thing language-wise, so long as the range > limits are static types. > > Is this a compiler funny or an Ada funny? > >