"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 ... : : :