At 10:42 PM +0100 28/2/03, Frank Heckenbach wrote:
Russell Whitaker wrote:
On Fri, 28 Feb 2003, CBFalconer wrote:
Grant Jacobs wrote:
.. snip ...
Since these uses statements were within the interface section, I presumed the definitions would propagate upwards so that they form a hierarchy. Or, put another way, I assumed the interface of a unit is extended by any units it uses in its interface section.
That would be very poor practice, since it would expose routines, types, variables in areas where one wishes to keep them inaccessible. Uses does not, and should not, mean export.
Not quite. given:
Unit foo; interface uses bar; implementation uses nobar; begin end.
In any user of foo, anything in the interface section of bar should be visable; unit nobar remains hidden.
Nope. Using `bar' in the interface only means its declarations are available when processing the interface declarations of `foo', not that they're re-exported.
I'm getting this from a lot of different directions :-)
As I said, that's quite clear in BP (which is the "standard" as far as units are concerned).
With EP modules, the problem actually doesn't arise, since everything exported must be named explicitly, but GPC's `all' behaves like BP with units.
Looks I might have to swop from units to modules using export to achieve the effect I want. After putting units into everything... sigh.
Cheers,
Grant