Name resolution (programming languages): Difference between revisions

Content deleted Content added
Name masking: Minor clarification.
Name masking: Welp. Seems I overclarified. Fixed now though.
Line 43:
private int foo; // Name "foo" is declared in the outer scope
 
public void setFoo(int foo) { // Name "foo" is declared in the inner scope, asand wellis function-local.
this.foo = foo; // Since "foo" will be first found (and resolved) in the ''innermost'' scope,
this.foo = foo;
// in order to successfully overwrite the stored value of attribute "foo"
// with the new value of incoming parameter "foo", a distinction is made
// between "this.foo" (the object attribute) and "foo" (the function parameter).
}