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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd3300f3a56e7f45 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-18 22:38:28 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!priapus.visi.com!orange.octanews.net!news-out.visi.com!petbe.visi.com!news.octanews.net!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Marius Amado Alves" Newsgroups: comp.lang.ada Subject: Re: different compilers: different standard types????? Date: Fri, 19 Mar 2004 06:36:35 -0800 Organization: Cuivre, Argent, Or Message-ID: References: <200403181313.16003.maa@liacc.up.pt> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1079678230 68913 212.85.156.195 (19 Mar 2004 06:37:10 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Fri, 19 Mar 2004 06:37:10 +0000 (UTC) To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-OriginalArrivalTime: 19 Mar 2004 06:37:02.0565 (UTC) FILETIME=[96857150:01C40D7C] X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:6430 Date: 2004-03-19T06:36:35-08:00 > > The standard requires that "the range of Integer should be no wider > > than that of Long_Integer" 3.5.4 (25). (I'm not sure this is an > > intelligent limitation, but never mind.) > > What would you like it to say instead? I guess have a named type (Integer) for the largest base available. Then no need for System constants Max/Min_Int. Use 'First, 'Last instead. Also what's the use of Short_ and Short_Short_ if you have representation clauses for 'Size? The optimal size for a given target would be given in the documentation for that target. > > GNAT defines Integer and Long_Integer for 32-bit, and > > Long_Long_Integer for 64-bit. > > > > So if you want to define an integral type with a greater range than > > (the associated with) 32 bits, you have to use Long_Long_Integer as > > a base. > > Hmm. Let's declare a type: > > type My_Long_Int is range -2**50 .. 2**50 -1; > > You don't _specify_ Long_Long_Integer, but the compiler does use a 64 > bit integer as the base type. Just to be picky :). Yes. As I said before I had forgotten that the integer base type is nameless. You can stop bashing now ;-) > Integer is used for the index of String; it probably does not make > sense for that to be 64 bits. Why waste space? String is another slightly disturbing thing. I'd rather have an Ada.Arrays generic on the types of index and element. Talk small. And then the same "create your own integers" argument would apply here. Create your own Strings. But this is designing a new language. (No, not C.)