From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Weird behavior with modular type
Date: Tue, 07 Feb 2012 19:21:05 +0100
Date: 2012-02-07T19:21:05+01:00 [thread overview]
Message-ID: <op.v9bmlfrvule2fv@douda-yannick> (raw)
In-Reply-To: 32c99412-2c88-4438-a955-de19a7f034a2@d15g2000yqg.googlegroups.com
Le Tue, 07 Feb 2012 19:06:55 +0100, Adam Beneschan <adam@irvine.com> a
écrit:
>> 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‑supported user).
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.
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.
--
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University
next prev parent reply other threads:[~2012-02-07 18:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-07 17:24 Weird behavior with modular type Yannick Duchêne (Hibou57)
2012-02-07 17:49 ` Jeffrey Carter
2012-02-07 18:06 ` Adam Beneschan
2012-02-07 18:21 ` Yannick Duchêne (Hibou57) [this message]
2012-02-08 6:53 ` J-P. Rosen
2012-02-08 15:29 ` Adam Beneschan
2012-02-09 3:37 ` Randy Brukardt
2012-02-07 18:15 ` Yannick Duchêne (Hibou57)
2012-02-07 17:53 ` Adam Beneschan
2012-02-07 17:54 ` Gautier write-only
2012-02-07 18:23 ` Yannick Duchêne (Hibou57)
2012-02-09 3:40 ` Randy Brukardt
2012-02-07 18:02 ` Adam Beneschan
2012-02-07 18:32 ` Georg Bauhaus
2012-02-07 18:13 ` Yannick Duchêne (Hibou57)
2012-02-07 18:15 ` Adam Beneschan
2012-02-07 18:35 ` Yannick Duchêne (Hibou57)
2012-02-07 18:40 ` Adam Beneschan
2012-02-07 19:22 ` Yannick Duchêne (Hibou57)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox