From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: integer questia
Date: Mon, 26 Apr 2010 19:11:12 -0400
Date: 2010-04-26T19:11:12-04:00 [thread overview]
Message-ID: <wcciq7dg67j.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: bad42cbb-5c38-4149-a234-981e5c536c53@b23g2000yqn.googlegroups.com
bedriemir <bedriemir@gmail.com> writes:
> what is the relation of root_integer , universal_integer and Integer
universal_integer is sort of like root_integer'Class.
All integer types you declare are implicitly derived from
root_integer. Integer, which is Standard.Integer, is
derived from root_integer as usual. "Integer" is badly named
(since it's not the true infinite set of integers),
and Standard is badly named (since it contains types
like Integer with non-standard, implementation-defined
ranges). Typically, Integer has a range of -2**31..2**31-1.
Most of the time, root_integer and universal_integer expressions
have static values (known at compile time), and therefore have
infinite range. For example, you can say:
N : constant := 2**999;
even though your computer doesn't have 999 bits in a machine integer.
At run-time, however, root_integer and universal_integer expressions
will use the largest integer type supported at run time (64-bits,
in GNAT).
- Bob
next prev parent reply other threads:[~2010-04-26 23:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 9:20 integer questia bedriemir
2010-04-23 10:01 ` J-P. Rosen
2010-04-23 19:12 ` Adam Beneschan
2010-04-26 23:11 ` Robert A Duff [this message]
2010-04-27 4:55 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox