Go backward to Semantics of Command Block
Go up to Top
Go forward to Dynamic Scoping
Scope
- How is an invocation associated with the definition it invokes?
- begin
var A: newint;
proc P = begin var
C: newint
in C:=@A end
proc Q = begin var
B: newint; A: newint
in A:=1;
call P end
in A:=0; call P;
call Q;
end
- Does C become 0 or 1?
- Static Scoping
- Invocation of I is associated with definition of I whose scope contains
definition.
- Assocation between invocations and definitions can be calculated at
compile-time!
- Typing rules based on static scoping.
Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: qualification.tex,v 1.2 1996/05/02 11:53:49 schreine Exp schreine