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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74fbf0c5ce05c298 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-25 13:29:15 PST Path: sparky!uunet!cs.utexas.edu!uwm.edu!biosci!agate!linus!linus.mitre.org!linus!mbunix!eachus From: eachus@dr_no.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: Re: Ada Decimal Arithmetic & Representations (ADAR) V1.0 available Message-ID: Date: 25 Mar 93 21:29:15 GMT References: <1993Mar22.095301.806@enpc.fr> <1993Mar22.223336.23771@telesoft.com> <1993Mar25.012215.26844@telesoft.com> Sender: news@linus.mitre.org (News Service) Organization: The Mitre Corp., Bedford, MA. In-Reply-To: kst@telesoft.com's message of Thu, 25 Mar 1993 01:22:15 GMT Nntp-Posting-Host: dr-no.mitre.org Date: 1993-03-25T21:29:15+00:00 List-Id: In article <1993Mar25.012215.26844@telesoft.com> kst@telesoft.com (Keith Thompson @pulsar) writes: > The article I was responding to (not written by Robert Eachus) described > the Alsys SPARC compiler's lack of a Long_Integer type as a shortcoming. > This is unfair (IMHO). For the SPARC hardware, it's perfectly appropriate > to define type Integer as 32 bits (it's a 32-bit processor, after all), > and not to define a type Long_Integer (the SPARC doesn't directly support > 64-bit arithmetic operations). Better IMHO is to have Long_Integer in STANDARD as the longest supported Integer type, even if it is the same length as Integer. I "overreacted" in this case because the examples mentioned have Long_Integer with a comment to use the longest integer type available... the intent was that anyone getting an error message could figure it out, but if we put in Integer, it would compile with no warnings then fail at run-time. (And it is a case where, as I said, you do want to use Integer if possible.) (A brownie point to anyone who recognizes "JCN 9000"). -- I'm afraid I can't do that, Dave... > This isn't pretty, but it should work for anything up to 64-bit > integers. Thanks to Gary Dismukes for the idea. -- Nice try, but not necessarily static! An expression which raises -- an exception is not-static. It is legal for a compiler not to -- raise an exception when evaluating B20, but it is also legitimate -- to raise one. So, if it works on your compiler, a tip o' the hat, -- but it is not really portable. (And boy is it ugly! :-) By the -- way, I gave a presentation at a SIGAda conference on a different -- case of implementation dependant static expressions which caused a -- program to be illegal. Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is... -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...