"Jean-Pierre Rosen" wrote in message news:j50hfd.l2a.ln@hunter.axlog.fr... > Robert A Duff a �crit : > > Why would you want an unconstrained array indexed by enumeration type? > > And why would you want an empty array if the array type is constrained? > > > I do that all the time, especially in ASIS programming. You may have > arrays indexed with subranges of declaration_kinds for example. > I recall a project where an Ada newbie, having learned about enumerated types, created one enumerated type that was three pages long. That is, the number of values in the type was so great that it took three pages of 11 X 14 standard printer paper to contain it. This was a situtation where a good idea was carried to an absurd extreme. When choosing to design an enumerated type, whether for array indexing, or otherwise, there are a few simple rules I have set for myself. 1) Keep the number of values to a minimum, 2) Don't invent an enumerated type that creates global dependencies, 3) An enumerated type should not require constant addition of new values throughout the maintenance cycle. I have heard it expressed at some software-oriented conferences that enumerated types represent an old-fashioned way of thinking about software design. Some in the OO community believe that, because enumerated types are not extensible, they actually thwart good OO design. Perhaps if enumerated types were extensible, something I suggested during the Ada 95 process, they would be more acceptable in OOP. However, I was persuaded that the complexity of Ada, should that be done, would be so much greater that the idea was a bad one. As to using real numbers for array indexing, I think there are better alternatives. An array, one-dimensional or multi-dimensional, can be represented in other ways than an array. That is, there are other structures that can be topologically homeomorphic to the array structure which can be indexed via keys that are based on real numbers, but which resolve, computationally, to discrete values. The solution is left as an exercised to the student. Richard Riehle