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.4 required=5.0 tests=BAYES_00,FROM_WORDY, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,32dcee4844599b87 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-18 18:23:37 PST Path: supernews.google.com!sn-xit-02!supernews.com!news-x.support.nl!portc03.blue.aol.com!europa.netcrusader.net!207.172.3.44!feed2.news.rcn.net!rcn!howland.erols.net!nntp.flash.net!news.flash.net!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada References: <3A3D01EA.37CB440B@libertysurf.fr> <91jnbv$joo$1@nnrp1.deja.com> <3A3E888E.E897AF0F@libertysurf.fr> Subject: Re: GNAT Error message X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Tue, 19 Dec 2000 02:23:36 GMT NNTP-Posting-Host: 216.215.65.241 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 977192616 216.215.65.241 (Mon, 18 Dec 2000 20:23:36 CST) NNTP-Posting-Date: Mon, 18 Dec 2000 20:23:36 CST Organization: FlashNet Communications, http://www.flash.net Xref: supernews.google.com comp.lang.ada:3236 Date: 2000-12-19T02:23:36+00:00 List-Id: "Thierry&Annick" wrote in message news:3A3E888E.E897AF0F@libertysurf.fr... : Robert Dewar a �crit : : : > In article <3A3D01EA.37CB440B@libertysurf.fr>, : > Thierry&Annick wrote: : > : > > test.ada:13:38: invalid operand types for operator "-" : > > test.ada:13:38: left operand has type "Index_Type" defined : > at test.ada:2 : > > test.ada:13:38: right operand has type "Index_Type" defined : > ... : : > Feel free to suggest how GNAT could make this clearer (and : > submit your suggestion to report@gnat.com). I don't really : > see any way of making this clearer. : : I suggest 'no binary operator "-" for enumeration type Index_Type' Which Index_Type? Seems like the compiler should identify this more clearly (e.g. by noting that it was the one declared at "test.ada:2"). And what if one (or more) binary operators "-" had been declared involving Index_Type, but none had *both* a left and right operand of Index_Type (i.e., one of the operands was a non-Index_Type in each case)? Seems like the compiler should point out that it couldn't find a binary operator "-" where the specific left and right operand types used didn't match any of the "-" visible at the point of use. And, in fact, this is exactly what the compiler did! : > : > : > The compiler is telling you that there is no "-" operator : : So it should tell it as you do. : : I spent some time finding my error, I hope to remember it next time ... : : :