Originally Posted by rhiorg
Sounds kinda like caching. (I'm coming from the C#, server-side world mostly.)
|
That's actually an apt description of "local". Whatever follows is "cached" to your code's scope. Any object declared by "local" in your code, either a new one or one equal to a global one, is only usable by your code. A slight exception is a global table. When you declare a new object equal to a table, you are actually creating a reference to that table. Every time your code changes the object you made, the global table is changed as well, and vice versa (your local object sees changes to the global one). Other code still cannot use this local reference but can still manipulate the table it points to.