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=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32dcee4844599b87 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-17 17:10:05 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: GNAT Error message Date: Mon, 18 Dec 2000 00:56:33 GMT Organization: Deja.com Message-ID: <91jnbv$joo$1@nnrp1.deja.com> References: <3A3D01EA.37CB440B@libertysurf.fr> NNTP-Posting-Host: 205.232.38.41 X-Article-Creation-Date: Mon Dec 18 00:56:33 2000 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x67.deja.com:80 (Squid/1.1.22) for client 205.232.38.41 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:3220 Date: 2000-12-18T00:56:33+00:00 List-Id: 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 > Ok, my fault : Index_Type should be "range <>" to have a "-" operator, > but the error message is not clear. 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. The compiler is telling you that there is no "-" operator defined that would apply to the types of the operands, and then it tells you the types of the operands, so that you figure out the real problem (which might be that you meant to define a "-" operator but did not, or it might be that you accidentally typed the wrong thing as one of the operands. Sent via Deja.com http://www.deja.com/