comp.lang.ada
 help / color / mirror / Atom feed
From: matthew_heaney@acm.org (Matthew Heaney)
Subject: Re: Renaming Fixed Point Mutiplicative operator in Ada 95
Date: 1998/05/21
Date: 1998-05-21T00:00:00+00:00	[thread overview]
Message-ID: <matthew_heaney-ya023680002105980856230001@news.ni.net> (raw)
In-Reply-To: 6k0na0$po4@gcsin3.geccs.gecm.com


In article <6k0na0$po4@gcsin3.geccs.gecm.com>, John McCabe
<john@assen.demon.co.uk> wrote:

(start of quote)
matthew_heaney@acm.org (Matthew Heaney) wrote:

>We disagree here - as we have in the past.  Fair enough.  Then how about
>enumerating the specific circumstances under which a fixed point
>multiply can raise an exception? 
>
>My assumption was that, because the multiplication returns universal
>fixed, no exception would be raised.  So what would be the point of
>overriding the predefined operator in order to handle the "exception"?

Are you suggesting that in the example given, if LEFT and RIGHT are both 
100, you get no exception and are returned a valid value (i.e. in the 
range -1000.0 to 1000.0?
(end of quote)

That is indeed that case.  It doesn't matter what the limits of the
operands are, because the result of muliply is of type universal fixed,
which is unconstrained.

(start of quote)
If no exception is raised, how do you tell whether the limits of a types 
range have been exceeded or not? 
(end of quote)

The constraint check happens during assignment, during implicit conversion
from universal fixed to the target type.




      parent reply	other threads:[~1998-05-21  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-19  0:00 Renaming Fixed Point Mutiplicative operator in Ada 95 Stuart Hutchesson
1998-05-19  0:00 ` Matthew Heaney
1998-05-20  0:00   ` Robert Dewar
     [not found]     ` <matthew_heaney-ya023680002005981908570001@news.ni.net>
1998-05-21  0:00       ` Robert Dewar
1998-05-22  0:00         ` Robert I. Eachus
1998-05-23  0:00           ` Robert Dewar
     [not found]       ` <01bd84c3$47215d60$440029a1@m00rq900>
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00           ` Simon Pilgrim
1998-05-21  0:00             ` Matthew Heaney
1998-05-22  0:00               ` Robert I. Eachus
1998-05-22  0:00           ` Rod Chapman
1998-05-22  0:00             ` John McCabe
1998-05-22  0:00           ` Stuart Hutchesson
1998-05-22  0:00             ` Matthew Heaney
1998-05-23  0:00             ` Robert Dewar
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00         ` Matthew Heaney
1998-05-21  0:00       ` John McCabe
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00         ` Matthew Heaney [this message]
replies disabled

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