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,60fe876e7675f11 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.135.231 with SMTP id pv7mr14719815pbb.8.1328638107424; Tue, 07 Feb 2012 10:08:27 -0800 (PST) Path: lh20ni271301pbb.0!nntp.google.com!news1.google.com!postnews.google.com!d15g2000yqg.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Weird behavior with modular type Date: Tue, 7 Feb 2012 10:06:55 -0800 (PST) Organization: http://groups.google.com Message-ID: <32c99412-2c88-4438-a955-de19a7f034a2@d15g2000yqg.googlegroups.com> References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1328638107 31251 127.0.0.1 (7 Feb 2012 18:08:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 7 Feb 2012 18:08:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d15g2000yqg.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; 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; .NET4.0C),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-02-07T10:06:55-08:00 List-Id: On Feb 7, 9:49 am, Jeffrey Carter wrote: > On 02/07/2012 10:24 AM, Yannick Duch=EAne (Hibou57) wrote: > > > > > Seems in the first case, the left-side of "E < 10 ** I" has a modulo ap= plied, or > > else, I see no way to explain the result, "FALSE". But why would this m= odulo be > > applied with a subtype of Natural and not with an Universal_Integer? > > Seems to me in both cases the expression on the right of "<" is > Universal_Integer. What compiler message did you get? If the argument on the right of "<" is a *static* Universal_Integer whose value is larger than 255, then an error message should be generated (4.9(35)). Here, the expression is not static, so there shouldn't be an error; as I mentioned earlier, GNAT does give an error which appears to me to be a compiler bug. -- Adam