Re: confusion about include
- Posted by DerekParnell (admin) Aug 07, 2010
- 1248 views
Version 3 Scope
A symbol is either private or global. It is private if it does not have the global keyword before the declaration.
private | : | Can be accessed by code in the same enclosing block as the declaration and by code in blocks defined inside the enclosing block. |
global | : | Can be accessed by anything in the application. |
Ok, but v3 docs say about "local" symbols too. And there are the rules about local and global symbols in a file. The local symbol has priority over the global one.
What do we have on that matter in v4?
That hasn't changed. I think Derek mixed up private and local. Private symbols have scope inside of a routine. Local symbols are scoped to a file, and a local symbol takes precedence over an export, public or global symbols. Private symbols take precedence over all other symbols.
Matt
Correct, that hasn't changed but I didn't mention the term 'local' because I just wanted to concentrate of the difference between symbols that were being exposed outside of the file they were declared in.