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/10 Message-ID: <6t93vn$g8l$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 389792111 References: <6t6ihg$dkn1@onews.collins.rockwell.com> X-Http-Proxy: 1.0 x4.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: Thu Sep 10 17:58:15 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-09-10T00:00:00+00:00 List-Id: In article , stt@houdini.camb.inmet.com (Tucker Taft) wrote: > Wayne Magor (wemagor@sym1.cca.rockwell.com_nospam) wrote: > > : I don't follow this newsgroup regularly, so I'm sorry if this topic has > : been discussed to death already. > > : I'd like to know if there is a plan to fix the design error in Ada95 that > : prevents user overloading of the "*" and "/" operators for fixed-point > : types (it results in an ambiguity on the call)? > > No solution has been defined. The best workaround is to use names > other than "*" and "/" for user-defined multiply and divide operations > for fixed-point types. You can overload the predefined "*" and "/" for > the type of interest with an "abstract" definition to make it less > likely they get misused. > > : ... The last I heard, the > : GNAT compiler did not implement fixed-point correctly (as per the Ada95 > : spec) so this wasn't a problem for that compiler. Is that true? Can > : other compilers do the same? > > This seems like the wrong solution. We did discuss various explicit > pragmas to get Ada-83 compatible behavior, but I don't believe > it went anywhere. > > : I had heard that this problem was known and was being discussed over a > : year ago. Was there a resolution, or is it being deferred to the next > : version of Ada? > > : Is there a web site that contains Ada language issues such as this? > > www.adaic.org has an archive of comments. If you have your own comments, > you can send them to ada9x-mrt@inmet.com, where they will get logged, and > redistributed to all interested parties once a day. The format for > comments is given in the Reference Manual. You can also get yourself > added to the "interested parties" list by sending mail to stt@inmet.com. > > : Also, what is the name of the Ada language maintenance committee? > > The Ada Rapporteur Group, which is part of ISO Working Group 9 (WG9) > > : Thanks, > : Wayne. > > -- > -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ > Intermetrics, Inc. Burlington, MA USA > An AverStar Company > The current version of GNAT Professional most certainly implements fixed-point in a manner consistent with the RM, and generates the very annoying ambiguities referred to here. (it is possible that various obsolete versions of GNAT may have done something else, but for the current version we do not know of any errors in this area). Note that if you use -gnat83, then of course the ambiguities are properly suppressed. Actually this is to be honest less annoying than you might think. Unless you are using fixed-point as "poor man's floating-point" [a dubious proposition now that virtually all processors do floating-point faster than fixed-point], it makes little sense to do something like function "*" (x,y : dollars_cents) return dollars_cents; since, as in this case, there is an obvious conceptual type error in this declaration. Robert Dewar Ada Core Technologies -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum