From: dewarr@my-dejanews.com
Subject: Re: Fixed point design error in Ada95
Date: 1998/09/12
Date: 1998-09-12T00:00:00+00:00 [thread overview]
Message-ID: <6tdidm$454$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 6t9dlk$e0t1@onews.collins.rockwell.com
In article <6t9dlk$e0t1@onews.collins.rockwell.com>,
> I'll certainly agree with you that there aren't a lot of uses for
> fixed-point operator overloading.
>
> We are running host-based simulations of avionics systems which run
> on a special avionics processor. That processor does not have
> floating point, but has something called fractional arithmetic.
>
> The fractional arithmetic does not work exactly the same way as
> Ada's fixed point. There is no overflow detection with this
> hardware, which is why the operator must be overloaded in order
> to properly simulate the way the software will operate in the
> target. The target compiler is an Ada83 compiler, but the host
> compiler is an Ada95 compiler.
>
> It is unfortunate that Ada95 is not 100% backward compatible in
> this area, even if it has little impact on the user community.
>
> A pragma to give Ada83 operation would be a good solution.
>
> Thanks,
> Wayne.
First, a note, Ada does not require overflow detection for
fixed-point, you seem from the above to think it does, so
that is not a problem with your processor. The provision of
the Machine_Overflows attribute is intended precisely to
take care of this situation.
Second, you obviously don't need operator overloading, there
are perfectly reasonable work arounds here. They are a bit
annoying, but certainly acceptable for new code.
I agree that with legacy code you are in trouble, this is
indeed one of the most severe incompatibilities between
Ada 83 and Ada 95. I shouted around insisting that we should
fix it when it was first noticed (which was rather late), but
it seemed "too-late-at-this-stage" to do anything about it
to most people, and perhaps they were right.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
next prev parent reply other threads:[~1998-09-12 0:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-09 0:00 Fixed point design error in Ada95 Wayne Magor
1998-09-10 0:00 ` Tucker Taft
1998-09-10 0:00 ` dewarr
1998-09-10 0:00 ` Wayne Magor
1998-09-12 0:00 ` dewarr [this message]
1998-09-11 0:00 ` GNAT Professional ? Mats Weber
1998-09-11 0:00 ` dewarr
1998-09-12 0:00 ` Paul Whittington
1998-09-14 0:00 ` Al Christians
1998-09-14 0:00 ` dewarr
1998-09-15 0:00 ` Paul Whittington
1998-09-15 0:00 ` Markus Kuhn
1998-09-15 0:00 ` Peter Hermann
1998-09-15 0:00 ` dewarr
1998-09-11 0:00 ` dennison
1998-09-11 0:00 ` Fixed point design error in Ada95 Wayne Magor
1998-09-11 0:00 ` dewarr
1998-09-12 0:00 ` Robert I. Eachus
1998-09-12 0:00 ` dewarr
1998-09-17 0:00 ` 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