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: a07f3367d7,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!news2.arglkargh.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Learning Ada (Was: unsigned type) Date: Mon, 6 Jul 2009 18:15:16 -0500 Organization: Jacob Sparre Andersen Message-ID: 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> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1246922162 15738 69.95.181.76 (6 Jul 2009 23:16:02 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 6 Jul 2009 23:16:02 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:6871 Date: 2009-07-06T18:15:16-05:00 List-Id: "anon" wrote in message news:4Aa4m.421894$4m1.207252@bgtnsc05-news.ops.worldnet.att.net... ... > But Ada also, use standards for it types, "Integer", and "Float', > with > their associate subtypes. One reason but not the only reason for the > range of > these built-in types are the hardware. If the hardware uses 32-bits > integers > then the Ada "Integer" is based on 32-bit. This statement is not true. For instance, for Janus/Ada 95 on Windows, type Integer is 16-bits. (We chose that to remain compatible with our earlier compilers.) All the standard requires is that Integer is 16-bits, and that Long_Integer (if it exists) is longer than Integer. Thus, type Integer means vastly different things when compiled with Janus/Ada on Windows as compared to when compiled with Gnat on Windows. If you need values up to 1 million, you will have no portability at all if you use type Integer. OTOH, type My_Int is range 0 .. 1_000_000; will work properly on both compilers (and most likely, on any other Ada compiler for Windows). So which is more portable?? Randy.