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,FREEMAIL_FROM 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,UTF8 Received: by 10.68.231.202 with SMTP id ti10mr802728pbc.5.1328638867167; Tue, 07 Feb 2012 10:21:07 -0800 (PST) Path: lh20ni271343pbb.0!nntp.google.com!news2.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Weird behavior with modular type Date: Tue, 07 Feb 2012 19:21:05 +0100 Organization: Ada @ Home Message-ID: References: <32c99412-2c88-4438-a955-de19a7f034a2@d15g2000yqg.googlegroups.com> NNTP-Posting-Host: eQxAA/sqYBHh2aCJsHQRLA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.61 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-02-07T19:21:05+01:00 List-Id: Le Tue, 07 Feb 2012 19:06:55 +0100, Adam Beneschan a = =C3=A9crit: >> 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. I believe too this is a compiler bug for the failure to compile, as you = = confirm, I will submit a report (as an non=E2=80=91supported user). I still can't explain the first and the second interpretation. In the = first case =E2=80=9C10 ** I=E2=80=9D seems to be interpreted as =E2=80=9C= (10 ** I) mod 256=E2=80=9D and = =E2=80=9CNatural'Pos (10 ** I)=E2=80=9D seems not. That's why I expecting an answer from the RM. But could not remmember = where such a thing is specified. So much different interpretation when = switching from a Natural to an Universal_Integer. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity