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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!news.stack.nl!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Fri, 04 Apr 2014 16:25:01 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <2d62368c-9f64-49f3-98a8-5121d0c0fa23@googlegroups.com> <1396504291.12566.134.camel@pascal.home.net> <1396545517.12456.30.camel@pascal.home.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 4 Apr 2014 23:25:03 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="bd5e647da89610f9b7b0763dacbc65f9"; logging-data="2035"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GIxRvB2kx3Kt/BIr8Uh9Ioa5RI7CDE4U=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Cancel-Lock: sha1:RS0RyO2fXbkeD7rgXTBYluYvSD8= Xref: number.nntp.dca.giganews.com comp.lang.ada:185540 Date: 2014-04-04T16:25:01-07:00 List-Id: On 04/04/2014 01:53 PM, Randy Brukardt wrote: > > I missed that someone wrote a literal that's insanely large. They should > simply have written: > > I : Unbounded_Integer := (raise Storage_Error); > > because that's what will happen. I was thinking about more realistic cases: 1E1_000 is hardly insanely large for an Unbounded_Integer type. It should take less than 420 bytes to store that value. And being unbounded, they're probably on the heap. > Really_Large : Unbounded_Integer := +10**1000; -- Or as a stickler > +1*(+10**1000); > > alternatively: > > Really_Large : Unbounded_Integer := Value("1E1000"); Sure, because these are packages rather than language support for unbounded integers. Such support should allow all literals the compiler can handle. Every Ada compiler I've used could handle Really_Large : constant := 1E1_000; Almost_Large : constant := 1E999; X : Positive := 28 * Really_Large / Almost_Large; -- Jeff Carter "He didn't get that nose from playing ping-pong." Never Give a Sucker an Even Break 110