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-Thread: 103376,2a34b7ad6c6a0774 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!teleglobe.net!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Efficiency of code generated by Ada compilers Date: Mon, 09 Aug 2010 11:42:29 -0700 Organization: Netfront http://www.netfront.net/ Message-ID: References: <1jmwhfp.roo31ybayx2bN%csampson@inetworld.net> NNTP-Posting-Host: 75.211.157.188 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1281379351 43319 75.211.157.188 (9 Aug 2010 18:42:31 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Mon, 9 Aug 2010 18:42:31 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 In-Reply-To: Xref: g2news1.google.com comp.lang.ada:13003 Date: 2010-08-09T11:42:29-07:00 List-Id: On 08/09/2010 06:28 AM, Robert A Duff wrote: > > Signed integers work fine for that. Except when you need > that one extra bit -- that's the problem. We've been able to do type T is range 0 .. 2 ** N - 1; for T'Size use N; since Ada 83. So the only problem is when you want the equivalent of type T is mod System.Max_Binary_Modulus; since System.Max_Binary_Modulus - 1 > System.Max_Integer. -- Jeff Carter "Run away! Run away!" Monty Python and the Holy Grail 58 --- news://freenews.netfront.net/ - complaints: news@netfront.net ---