Re: private include files
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Oct 13, 2004
- 424 views
On Wed, 13 Oct 2004 08:06:31 +0200, Juergen Luethje <j.lue at gmx.de> wrote: >It will be confusing anyway, because there is no "private procedure", or >"private object". E.g. Hayden McKey is already confused, _before_ this >feature is actually implemented. That's a very interesting point. The problems we are discussing here are not really about "hiding" a global the author /intended/ to make publicly available, but about not exposing things the author needed to make visible throughout all the code of the library component, but "global" unintentionally makes them visible externally. Forgetting what has been said about 'global include' and 'private include' for a moment, try this on for size: A private procedure or object would be visible inside sub-includes, similar to global variable handling, but would be removed from the symbol table at the end of the file that defined it, which is more like local variable handling. The sneaky bit is that when a file is "privately included", then these private variables do NOT disappear, but become visible until the end of the including file. Package-level, if you like. Regards Pete