procedure First is
begin
Put(X); -- Print X
New_Line; -- Print a newline character
end First;
procedure Second is
X: integer;
procedure Third is
X: Integer;
begin -- Third
x := 99;
First;
end Third;
begin -- Second
x := 88;
Third;
end Second;
begin -- Example
x := 77;
First;
Second;
end Example;
a) What will be printed by this program if we assume static scope?
b) What will be printed by this program if we assume dynamic scope?
Comments
Leave a comment