title: Question about Static and Dynamic Scoping Problem
body: <p>Can you confirm my answer for the following code:</p>
  
  <pre><code>procedure main
  var x,y,z;
  
      procedure sub1
         begin
          var x,z 
          x := 6;
          z := 7;
          sub2();
          x := y*z + x;
          print(x);       
        end
      procedure sub2
        begin
          var x,y
          x := 1;
          y := x+z+2;
          print(y);       
        end
  begin
      x := 1; y:=3; z:=5;
      sub1();
      sub2();
  end 
  </code></pre>
  
  <p>I got:</p>
  
  <ul>
  <li><p>static:</p>
  
  <pre><code>8
  27
  </code></pre></li>
  <li><p>dynamic:</p>
  
  <pre><code>10
  27
  </code></pre></li>
  </ul>
  
  <p>Is that correct?</p>