Answered step by step
Verified Expert Solution
Question
1 Approved Answer
7.9 Using the second organization of the symbol table described in the text (a stack of tables), show the symbol table for the following Ada
7.9 Using the second organization of the symbol table described in the text (a stack of tables), show the symbol table for the following Ada program at the three points indicated by the comments (a) using lexical scope and (b) using dynamic scope. What does the program print using cach kind of scope rule? procedure scope2 is a, b: integer; function p return integer is a: integer; begin -- point 1 a :- 0; b:- 1; return 2; end P: procedure print is begin -- point 2 put(a); new_line; put(b); new_line; put(); new_line; end print: procedure q is b, p: integer; begin -- point 3 a :- 3; b:- 4; P end - 5; print; begin a :-P end scope 2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started