x : integer := 3 //global scope
y : integer := 4 //global scope
procedure add
x := x + y
procedure second(P : procedure)
x : integer := 5
P()
procedure first
y : integer := 6
second(add)
first() //first procedure call in the main function
write integer(x) //function to print the value of a variable
在 first() 运行后,add() 修改 second::x,而不是 ::x 对吗?所以输出是 3... 但给出的答案是:Dynamic Scope (shallow binding): (x=5+y=6)=11