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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ead02e7101c0c023 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-01 09:05:43 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!sunqbc.risq.qc.ca!feeder.qis.net!feed2.onemain.com!feed1.onemain.com!uunet!dca.uu.net!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Problems with large records (GNAT) [continued] Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Thu, 1 Mar 2001 17:02:23 GMT References: <3A9CD67C.9B15C417@linuxchip.demon.co.uk> <86lmqq8xks.fsf@acm.org> <3A9E05B0.46B406ED@linuxchip.demon.co.uk> <3A9ECAA4.6E279BC9@linuxchip.demon.co.uk> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:5356 Date: 2001-03-01T17:02:23+00:00 List-Id: Dr Adrian Wrigley 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