Robert Dewar wrote: > By the way, I talked to a never-ever-use-use user of Ada > the other day who was appalled to discover that even if > you don't use USE clauses, you can have a case where you > write > > a := f (x); > > where there were no other occurrences of f in the same > source file, no USE clauses, and the textual declaration > of f was in another unit. > > This is of course standard in both Ada 83 and Ada 95 (if > you don't know how it arises, and always assumed that avoiding use > clauses guaranteed that this could not happen, > you have always been fooling yourself :-) > > I often find that people think that avoiding use clauses > avoids this, and requires full qualification. In fact in > the above example, suppose the only other occurrence of > f is in package p, then it is the case that trying to > qualify by writing > > a := p.f (x); > > is not just unnecessary, but in fact illegal. If I understand your example correctly, it reflects a problem which I recently had to fix in program written by someone else. We had the requirement not to use use and so the call of f had to be qualified as in your example above. The compiler complained about this of course and can you imagine what the programmer did in order to fix the problem? The type of x (B_Type) was derived from some other type (let's say A_Type). So the programmer wrote: a := p.f (p.A_Type(x)); The compiler was happy and in this particular case the program even did what it was assumed to do. The hidden bug in this statement is a maintenance time-bomb which would not have occurred if use had been used. Michael