Charles H. Sampson a �crit dans le message : 8a9eeg$qtv$1@newpoisson.nosc.mil... > During the deliberations that led to Ada 95, was a mechanism for > disallowing the pre-defined operations of a type considered? By "disal- > lowing" I mean some way of informing the compiler that an attempt to use > a certain pre-defined operation is a compile-time error. Did anyone > even ask for it? (Obviously I didn't, even though I've thought since > the mid-eighties that it would be a useful capability to have.) Not only was it considered - it's there. > As an example of what I'm talking about, consider a package that > implements three distinct floating-points types for measuring length, > area, and volume. The pre-defined "+" and "-" are acceptable and there > are obvious redefinitions of "*" and "/" in some cases. However, the > pre-defined "/" for operands of the same type don't make sense and it > would be nice to get a compile-time warning if one of them is used. function "/" (L, R : Length) return length is abstract; (but yes, the predefined one may reappear in generics, but that's a good thing; it allows you to use predefined math libs for example). -- --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://pro.wanadoo.fr/adalog