comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@dr_no.mitre.org (Robert I. Eachus)
Subject: Re: Ada Decimal Arithmetic & Representations (ADAR) V1.0 available
Date: 25 Mar 93 21:29:15 GMT
Date: 1993-03-25T21:29:15+00:00	[thread overview]
Message-ID: <EACHUS.93Mar25162915@dr_no.mitre.org> (raw)
In-Reply-To: kst@telesoft.com's message of Thu, 25 Mar 1993 01:22:15 GMT

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...



  reply	other threads:[~1993-03-25 21:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-19 21:16 Ada Decimal Arithmetic & Representations (ADAR) V1.0 available Michele L. Kee (AdaIC)
1993-03-21 23:12 ` Michael Feldman
1993-03-22  9:53   ` Rolf EBERT
1993-03-22 22:33     ` Keith Thompson @pulsar
1993-03-24  1:33       ` Robert I. Eachus
1993-03-25  1:22         ` Keith Thompson @pulsar
1993-03-25 21:29           ` Robert I. Eachus [this message]
1993-03-25 22:02             ` But it is possible Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox