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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d5b211b0c1ffcf3e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.152.217 with SMTP id h25mr350519bkw.3.1339687690465; Thu, 14 Jun 2012 08:28:10 -0700 (PDT) Path: e27ni47701bkw.0!nntp.google.com!news1.google.com!news4.google.com!news2.google.com!news.glorb.com!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Mon, 11 Jun 2012 12:16:14 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <1c82b5mc3waww.1t6q6vj61u36u.dlg@40tude.net> <42a87cf3ce9bfd6054f78b2b5b356301@dizum.com> <3e8c1c78-31b0-462e-8341-6d661fbc8378@googlegroups.com> NNTP-Posting-Host: 184.20.201.198 Mime-Version: 1.0 X-Trace: adenine.netfront.net 1339442178 75791 184.20.201.198 (11 Jun 2012 19:16:18 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Mon, 11 Jun 2012 19:16:18 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: <3e8c1c78-31b0-462e-8341-6d661fbc8378@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-06-11T12:16:14-07:00 List-Id: On 06/11/2012 11:29 AM, Adam Beneschan wrote: > > IIRC, some people have proposed adding unsigned integer types to the > language; they've argued that modular types aren't good enough for some > purposes. But the idea was turned down. Really, there are 2 orthogonal qualities: signed or unsigned representation, and overflow checking or not. These lead to 4 kinds of integer types. Ada has direct support for 2: * signed, checked (type T is range Low .. High;) * unsigned, unchecked (type T is mod High;) There is also a kind of support for unsigned, checked: type T is range 0 .. 2 ** N - 1; for T'Size use N; One can turn off overflow checking to get signed, unchecked. -- Jeff Carter "You me on the head hitted." Never Give a Sucker an Even Break 108 --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---