What are LOCAL variables and why do I care?
LOCAL variables are somewhat like PRIVATE variables in that they do not “scope up”; if you declare a PRIVATE or LOCAL variable in function B which is called from function A, then function A does not know the variable exists. Function A is even free to use the same name for a different variable entirely without risk of confusion. This is useful for writing functions that can avoid “stepping on” the variables that are floating around a larger application. LOCAL variables, introduced with Clipper 5.0, enforce a stricter kind of modularity. A LOCAL variable must be declared, and it is visible only to the particular function in which it is declared. (Remember that PRIVATEs are created by default.) Not only does a LOCAL variable refrain from “up-scoping” but it also will not “down-scope” either.