Question: 6. (10 marks) Suppose we have a new language, whose syntax is very similar to Pascal. Consider the following code segment. procedure Main is X:

 6. (10 marks) Suppose we have a new language, whose syntax

6. (10 marks) Suppose we have a new language, whose syntax is very similar to Pascal. Consider the following code segment. procedure Main is X: Integer; procedure Subl is X: Integer procedure Sub2 is X : Integer; begin end; begin end; procedure sub3 is begin end; begin end; (6.1) (3 marks) Assume that static scoping rule is used. For the following calling sequence, which declaration of X is used if we reference it in each procedure on the sequence, respectively? Main Sub1 Sub2 + Sub3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!