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: a07f3367d7,99a0564a79f2932b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!n8g2000vbb.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Type of subtraction operator Date: Fri, 29 May 2009 08:24:10 -0700 (PDT) Organization: http://groups.google.com Message-ID: <890d5a12-2a1d-4ee9-a443-324f5d60bfaf@n8g2000vbb.googlegroups.com> References: <8ae800c6-4307-4dc5-bf6b-d97101ae8521@x5g2000yqk.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1243610650 15332 127.0.0.1 (29 May 2009 15:24:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 29 May 2009 15:24:10 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n8g2000vbb.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6103 Date: 2009-05-29T08:24:10-07:00 List-Id: On May 28, 7:09=A0pm, a...@anon.org (anon) wrote: > Note: Also, using the two statements > > =A0 =A0Z : Integer :=3D Natural ( X - Y ) ; =A0 > =A0 =A0pragma Suppress ( Range_Check, On =3D> Z ) ; > > will will cause a CONSTRAINT_ERROR to occur at run time. But should it, > since Range checking for Z has been suppressed. Seems OK to me. The Constraint_Error is raised by evaluating the expression on the right-hand side of the :=3D and thus really has nothing to do with Z. Anyway, as AI95-224 says, "there is no clear definition (or agreement) on" the meaning of the On parameter of Suppress, which is why it's now an obsolescent feature. So while it's possible for two people to have two (or more) interpretations of what On=3D>Z means in this case, the language standard doesn't help decide which one is right. Furthermore, there's no requirement for Ada implementations to actually obey Suppress pragmas; code that uses Suppress must still expect that the exceptions may be raised anyway, and the AARM says the pragma should be used for efficiency only. -- Adam