I have this program:
var a, b:integer
procedure sub ()
var a,b:real;
begin
…
end
procedure sub1()
var c:integer
begin
…a…b…
end
begin
…
end
- With static scoping, a and b in sub1 are in main?
- With dynamic scoping, and with chain: main → sub → sub → sub1. Which variables a and b used in sub1?