comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: Weird behavior with modular type
Date: Tue, 7 Feb 2012 09:54:36 -0800 (PST)
Date: 2012-02-07T09:54:36-08:00	[thread overview]
Message-ID: <e2ffbbe1-dfda-4ccd-b192-f7ea08019622@gi10g2000vbb.googlegroups.com> (raw)
In-Reply-To: op.v9bjzvhzule2fv@douda-yannick

On 7 fév, 18:24, Yannick Duchêne (Hibou57)

>        B := E < 10 ** I;

E is of type Modular_Type.
10 ** I is untyped (Universal_Integer ?). It can be an expression of
type Modular_Type, among other possibilities.
So, the compiler chooses the "<" which has Modular_Type on both sides,
right ?
Then 10 ** 3 = 1000 = 232 (in the Modular_Type world) < 255 = E.
E is larger, thus the FALSE.
_________________________
Gautier's Ada programming
http://sf.net/users/gdemont



  parent reply	other threads:[~2012-02-07 17:56 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)
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 [this message]
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