|
"Inside" and "outside" aren't standard terms. We distinguish variables local to a procedure from those global to a procedure. If a global variable is used inside a procedure it's just the same variable "inside" and "outside." If a global variable and a local variable have the same identifier, they are still different variables. Under static scoping rules (which we are using independently of the parameter-passing strategy), if a global variable is passed as part of an actual parameter to a procedure containing a local variable with the same identifier, then the formal parameter refers to the global meaning, just as if the local variable had been renamed. For example, is equivalent to
Mike O'D. |
to: