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-13 14:09:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!wn2feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail From: Wannabe h4x0r Subject: Re: constrained subtypes Newsgroups: comp.lang.ada References: <3c8cc63b$1@pull.gecm.com> User-Agent: Pan/0.11.1 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "George Stevens" Message-ID: <56Qj8.34104$ZR2.17541@rwcrnsc52.ops.asp.att.net> NNTP-Posting-Host: 12.245.48.122 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52.ops.asp.att.net 1016057345 12.245.48.122 (Wed, 13 Mar 2002 22:09:05 GMT) NNTP-Posting-Date: Wed, 13 Mar 2002 22:09:05 GMT Organization: AT&T Broadband Date: Wed, 13 Mar 2002 22:09:05 GMT Xref: archiver1.google.com comp.lang.ada:21168 Date: 2002-03-13T22:09:05+00:00 List-Id: On Mon, 11 Mar 2002 10:00:10 -0500, George Stevens wrote: > 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? > > You might need to create an exception just in case the value, for some odd reason, just happens to fall outside the expected range. Though I cant say for sure. Chris