From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Problems with large records (GNAT) [continued]
Date: Thu, 1 Mar 2001 17:02:23 GMT
Date: 2001-03-01T17:02:23+00:00 [thread overview]
Message-ID: <wcczof5tobk.fsf@world.std.com> (raw)
In-Reply-To: 3A9ECAA4.6E279BC9@linuxchip.demon.co.uk
Dr Adrian Wrigley <amtw@linuxchip.demon.co.uk> writes:
> type Big_T is array (0 .. 64*1024*1024) of Float;
>
> begin
>
> Text_IO.Put_Line ("Size of Big_T is " &
> Integer'Image (Big_T'Size / System.Storage_Unit));
The above fails because you're implicitly converting Big_T'Size to
Integer, which is too small. That is, the conversion happens before the
divide. Try this:
type Big_Integer is range 0 .. System.Storage_Unit * (2**32);
Put_Line(Big_Integer'Image(Big_T'Size / System.Storage_Unit));
> Text_IO.Put_Line ("Size of Big_T is " &
> Integer'Image (Big_T'Max_size_in_storage_elements));
I don't know about that one.
- Bob
next prev parent reply other threads:[~2001-03-01 17:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-28 10:44 Problems with large records (GNAT) [continued] Dr Adrian Wrigley
2001-02-28 3:13 ` Robert A Duff
2001-02-28 12:09 ` Dr Adrian Wrigley
2001-02-28 9:51 ` Florian Weimer
2001-02-28 18:35 ` Laurent Guerby
2001-03-01 8:17 ` Dr Adrian Wrigley
2001-03-01 1:58 ` Robert A Duff
2001-03-01 22:18 ` Dr Adrian Wrigley
2001-03-01 17:02 ` Robert A Duff [this message]
2001-03-01 7:00 ` tmoran
2001-03-01 21:52 ` Dr Adrian Wrigley
2001-03-01 19:32 ` tmoran
2001-03-01 19:38 ` Laurent Guerby
2001-03-02 20:32 ` Randy Brukardt
2001-03-07 2:15 ` Dr Adrian Wrigley
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox