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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e6545823a74c7c29 X-Google-Attributes: gid103376,public From: dewarr@my-dejanews.com Subject: Re: Fixed point design error in Ada95 Date: 1998/09/12 Message-ID: <6tdidm$454$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 390387292 References: <6t6ihg$dkn1@onews.collins.rockwell.com> <6t93vn$g8l$1@nnrp1.dejanews.com> <6t9dlk$e0t1@onews.collins.rockwell.com> X-Http-User-Agent: Mozilla/2.02 (OS/2; I) X-Http-Proxy: 1.0 x8.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sat Sep 12 10:29:15 1998 GMT Newsgroups: comp.lang.ada Date: 1998-09-12T00:00:00+00:00 List-Id: 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