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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!newsfeed-fusi2.netcologne.de!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 06 Jul 2009 23:04:51 +0200 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Learning Ada (Was: unsigned type) References: <59O1m.404661$4m1.69194@bgtnsc05-news.ops.worldnet.att.net> <62792744-daca-437b-bdee-4b8a21f7ce27@j32g2000yqh.googlegroups.com> <82oq45tj2uu26u6ecsgq70bsjskr9dvghr@4ax.com> <878wj61bpo.fsf_-_@nbi.dk> <4a4f6cce$0$31869$9b4e6d93@newsspool3.arcor-online.net> <4Aa4m.421894$4m1.207252@bgtnsc05-news.ops.worldnet.att.net> <4a51d78d$0$30227$9b4e6d93@newsspool1.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a5266f7$0$32668$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 06 Jul 2009 23:04:55 CEST NNTP-Posting-Host: 9677cf4a.newsspool2.arcor-online.net X-Trace: DXC=:g_jY8fihJR;B_cA9EHlD;3Ycb4Fo<]lROoRa^YC2XCjHcbihG>GIg@Xl4dA:ho7QcPOVc:<:lgK@8cX`l4cihkTDZIj X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6867 Date: 2009-07-06T23:04:55+02:00 List-Id: anon wrote: > the [RM] comments declare > the "Integer" basically as the "universal type is universal_integer" and the > "Float" basically as the "universal type is universal_real". Do they? You mean, Humpty Dumpty is here again? ;-) > Now, A integer may change it range when switching from a 16-bit system to a > 64-bit system, but the 16-bit code will work because the range of a 16-bit > integer is a subrange of a 64-bit integer. Do you mean that every mention of Positive'Range, paradigmatically, will not be a problem when going from a 16bit sized Positive range to a 64bit sized Positive range? Did you have a minute to consider the example given, S : String (Positive'First .. Positive'Last / 2); on an 8GB RAM 64 bit system with 64bit sized Positive range? It *won't* work. Standard.Integer *did* create problems when porting to other sizes, that's how I understand what Randy Brukardt has said. There exist algorithms that will work when the bit size of Integer increases. But that's not relevant. Because Ada allows us to make this requirement explicit by declaring, that an algorithm shall profit from larger integer types: type Big_Num is range 0 .. System.Max_Int; This does what sets Ada apart from most other languages: the type distinguished application integer types and ubiquitous library integer types. A Good Thing when porting a program. [Other random remarks (really) and miscellanea portraying knowledge of many Ada compilers skipped.]