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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: When enumerating does Ada enumerated type goes up to up to Integer'Last or System.Max_Int Date: Thu, 22 Mar 2018 22:21:26 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 22 Mar 2018 21:21:26 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="bd3204d7458c456acd4401c606520df4"; logging-data="23349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4NX91HompnJxkPHej5jiAa47iLiyyWeo=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: Content-Language: en-US Cancel-Lock: sha1:puy+1y0nJjfLPdTbNDIWXWE/Xb4= Xref: reader02.eternal-september.org comp.lang.ada:51150 Date: 2018-03-22T22:21:26+01:00 List-Id: On 03/22/2018 07:44 PM, Bojan Bozovic wrote: > http://www.adaic.org/resources/add_content/standards/05aarm/html/AA-3-5-1.html > > Now this is more theory question as Ada Integer'Last is guaranteed to be at least 2**15-1 and perhaps nobody exhausted it by enumerating in practice, but that is minimal Integer'Last and nothing prevents implementation to have bigger System.Max_Int than its Integer'Last (as its in current GNAT which have System.Max_Int of 2**63-1). Character types are enumeration types, and therefore, technically, Wide_Wide_Character is an enumeration type with 2 ** 32 values. Since 'Pos is universal integer, presumably systems can handle up to System.Max_Binary_Modulus values. -- Jeff Carter "So if I understand 'The Matrix Reloaded' correctly, the Matrix is basically a Microsoft operating system--it runs for a while and then crashes and reboots. By design, no less. Neo is just a memory leak that's too hard to fix, so they left him in ... The users don't complain because they're packed in slush and kept sedated." Marin D. Condic 65