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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no 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 pv7mr266360pbb.8.1328758660680; Wed, 08 Feb 2012 19:37:40 -0800 (PST) MIME-Version: 1.0 Path: wr5ni3476pbc.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Weird behavior with modular type Date: Wed, 8 Feb 2012 21:37:31 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <32c99412-2c88-4438-a955-de19a7f034a2@d15g2000yqg.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1328758658 4305 69.95.181.76 (9 Feb 2012 03:37:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 9 Feb 2012 03:37:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-02-08T21:37:31-06:00 List-Id: "Yannick Duch�ne (Hibou57)" wrote in message news:op.v9bmlfrvule2fv@douda-yannick... ... >I still can't explain the first and the second interpretation. In the >first case "10 ** I" seems to be interpreted as "(10 ** I) mod 256" and >"Natural'Pos (10 ** I)" seems not. Yes, that's right of course. In the first case, everything has your modular type, in the latter case the expression has type Universal_Integer (which is obviously different). Ada always prefers non-universal types, so those are only used in rare circumstances. Randy.