comp.lang.ada
 help / color / mirror / Atom feed
From: "Ken Garlington" <Ken.Garlington@computer.org>
Subject: Re: GNAT Error message
Date: Tue, 19 Dec 2000 02:23:36 GMT
Date: 2000-12-19T02:23:36+00:00	[thread overview]
Message-ID: <IEz%5.12997$bw.1088284@news.flash.net> (raw)
In-Reply-To: 3A3E888E.E897AF0F@libertysurf.fr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]


"Thierry&Annick" <tajz@libertysurf.fr> wrote in message
news:3A3E888E.E897AF0F@libertysurf.fr...
: Robert Dewar a �crit :
:
: > In article <3A3D01EA.37CB440B@libertysurf.fr>,
: >   Thierry&Annick <tajz@libertysurf.fr> 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 ...
:
:
:





  reply	other threads:[~2000-12-19  2:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-17 18:11 GNAT Error message Thierry&Annick
2000-12-18  0:56 ` Robert Dewar
2000-12-18 21:58   ` Thierry&Annick
2000-12-19  2:23     ` Ken Garlington [this message]
2000-12-19 15:37     ` Robert Dewar
2000-12-19 15:56 ` Tucker Taft
2000-12-20  0:38   ` Robert Dewar
2000-12-20 17:44     ` Larry Kilgallen
2000-12-20 20:36       ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox